Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy1 Creating an Indicator in a Chart for Strategy2

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

    Strategy1 Creating an Indicator in a Chart for Strategy2

    Hello,
    I am looking for a way to integrate code into existing strategies. The purpose of this modification is to have Strategy1 create an Indicator on the Instrument’s Chart other Strategy2 can call upon for conditions used in Strategy2?

    Example:
    Strategy1 generates an indicator that outputs double in a window similar to William R%.
    Strategy2 calls on the value created by the indicator created by Strategy1.
    Strategy2 then uses Strategy1 values in a condition that it uses.
    Note: the double value will change as Strategy1’s output changes. (Currently OnPriceUpdate)

    The question becomes:
    Is this possible?
    and
    What scripting considerations should I take into account?
    and
    Please list all components required to accomplish this goal.

    #2
    Hello GTBrooks,

    That would not be possible, for a strategy to access an indicator you need to call that indicator in the strategies code. It would not be possible to have a strategy add an indicator to a chart and then have a different strategy access the chart indicator, the second strategy would have to create its own instance of that indicator in its code to use that indicator, that will be a different instance than the first strategy created.

    Comment


      #3
      Since the method I formulated does not work, is there another method of passing variables from one strategy to another?

      for instance: could I Set a public variable in Strategy1 that Strategy1 Get?

      Comment


        #4
        Hello GTBrooks,

        There is nothing supported to do that, strategies are intended to be isolated from each other. I would suggest combining the strategies into one so they share code and variables.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        54 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        72 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X