Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Secondary data series generating plot error

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

    Secondary data series generating plot error

    Hi,

    i am using a secondary data series in my indicator ( 60 ticks range ), while the indicator is plotted on a 20 range bar chart.
    The indicator works perfectly,, everything is calculated correctly, but my problem is that when i want to plot the signal :

    buy[0] = Low[1] - 5 * TickSize ( i want to plot the indicators signal 5 ticks below the previous bars low, on the 20 range chart that the indicator is loaded to )

    this plots the signal at the low of the previous 60 ticks bar, instead of the current 20 ticks range bar.

    What am i doing wrong?

    #2
    Hello gyilaoliver,

    A plot on a chart is synchronized with the primary series only.

    This means you should be assigning the plot values when BarsInProgress is 0.
    Low[1] would refer to the previous bar of the primary series when BarsInProgress is 0. (Lows[1][0] would be the most recent updated bar of the secondary series)

    You can retrieve values from a secondary series and assign those values to the plot series.

    May I confirm you are requiring BarsInProgress to be 0 when assigning the plot value?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chelsea. Indeed i was not using that.
      Now i added :

      if ( BarsInProgress != 0 ) return;

      and works just as imagined.

      Thank you very much for your help

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X