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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            67 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            150 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            99 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X