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 CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      222 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      138 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      154 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      237 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      195 views
      0 likes
      Last Post CarlTrading  
      Working...
      X