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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      50 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      16 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X