Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Wizard - Get Indicator Value from 3 bars

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

    Strategy Wizard - Get Indicator Value from 3 bars

    Hi,

    Is it possible using the strategy wizard (I'm not a programmer), to get the value of an indicator for the past 3 bars and add the total and then compare to a value? For example:

    Indicatorvalue(bar2) + Indicatorvalue(bar1) + Indicatorvalue(bar0) = totalvalue.

    totalvalue < 20

    Thank you.

    #2
    Hello bob77713,

    You may try to use the User Variable to be able to calculate this inside of the Strategy Wizard for something like this. Note that your Condition will have to be true before you use the variable so that NinjaTrader does the calculations before you use it.

    To do this you would want to use a "Set a user defined variable" in your Strategy Action part. Then under value, you may select your Indicator and add an Offset Type of Price, and select the Indicator again as the Offset with your Bars Ago reference. See attached screenshot for an example.
    Attached Files
    JCNinjaTrader Customer Service

    Comment


      #3
      JC,

      Thank you very much! It's exactly what I was looking for.

      Thanks,

      Bob

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      65 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 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