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 Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      639 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      572 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X