Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator/Strategy relationship

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

    Indicator/Strategy relationship

    Hi,
    I have a question about the relationship between the indicator and strategy.
    If I have a variable called trigger that is updated in a indicator when the opupdate() fucntion is serviced, and I reference that variable in a strategy, how does it get updated within the strategy. I created a simple test strategy and setup a condition based on the variable. What I am seeing is it never gets passed over to the strategy. Is there a specific way I must access it after I have used the add Trigger() in the strategy ?

    I hope this makes sense what I am asking
    Thanks

    #2
    Widgetman, did you expose this variable to be acccessed from the strategy? This reference sample will show you how this is accomplished - http://www.ninjatrader-support2.com/...ead.php?t=4991

    Comment


      #3
      Hi,
      Thanks for the reply. I am pretty sure I have exposed it in the strategy by doing a ADD( FunctionName(Trigger)) in the init routine. I then check the state of the variable by doing a if FunctionName.Trigger == x, but I get a error CS0119 when I try to compile. I looked in the help and there is no help data for this error. Any ideas ?
      Thanks

      Comment


        #4
        It would be helpful if you can post your code snippet so we can take a look, also I think you would want to expose the variable in the indicator not in the strategy.

        Comment


          #5
          Hi,
          Thanks for the help. My code is so convaluted it would be hard to trace thru. Is there a simple strategy example available that uses a simple indicator which checks a variable in the indicator itself ? I looked thru a few but did not see any examples using a specific variable from the indicator as a trigger.
          Thanks

          Comment


            #6
            I'm unfortunately not aware of a more specific one than this from our helpguide Widgetman - http://www.ninjatrader-support.com/H...V6/Update.html

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X