Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can we migrate a Strategy logic to Indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can we migrate a Strategy logic to Indicator

    I Am using strategy builder as an easy way to generate trading signals as an arrow on chart to signify condition met and then I execute trades manually. However executions do not show on chart while the Strategy is still active.

    Is there a way to "transport" relevant sections of the Strategy code into an indicator such that I can run my signal from an indicator and thereby get the signal and still see executions marked on chart while trade is progressing and when completed, without having to remove strategy from the chart.

    I am not using any of the other functions of strategy like for trade execution or generating alerts, I am only using part of builder as an easy way to generate code to select required indicators and encode my signal conditions and to generate chart drawing like arrow to flag signal conditions met.

    TIA
    suraj

    #2
    Hello suraj,

    Thank you for your inquiry.

    You can definitely use drawing objects from within an indicator script. As long as your strategy logic isn't using any strategy specific properties or methods, you can easily use that same logic within an indicator script.

    You can click on the 'View Code' button within the Strategy Builder to view the actual code of your strategy and use that in your indicator script.

    Please let us know if you have any further questions.

    Comment


      #3
      Hi Gaby,
      thanks for your pointers - I will try that.
      Couple of questions:

      How do I know if a property or method is strategy specific?

      Also I am currently plotting an arrow when the 50 MA crosses above or below the 200 MA. How would I, instead, in a lower panel plot a Green Band when ever the 50 MA is above the 200 MA by 4 ticks, plot the band with color red if 50 MA is below the 200 MA by 4 ticks and a Grey band if the 50 MA is within +/- 4 ticks of the 200 MA?

      TIA
      Suraj

      Comment


        #4
        PS How do I do that i.e. plot the Band, in Strategy Builder? I can then look to transfer that to an indicator.

        Comment


          #5
          Hello suraj,

          Thank you for your post.

          Something like MarketPosition is strategy specific, you can look up things in the Help Guide to see if they are for strategies only. What you are describing here doesn't sound strategy specific and could be accomplished from an indicator.

          Draw.ArrowUp or Draw.ArrowDown can be used to draw arrows.





          If you wanted to not draw a line on the price panel and instead draw an object on the indicator panel itself, set DrawOnPricePanel to false.



          I'm not sure what you mean by "plot the band". What band are you referring to?

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X