Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dataseries with multiple bar series

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

    dataseries with multiple bar series

    Hi, I am using primary (60min) and secondary (1min) bar series and only have limited knowledge of using them together with a variable that can be accessed when i am going between bar series.

    I tried to use a boolean variable that can be accessed by both data series but it doesn't seem to work? What do i need to do?

    So i tried to use a dataseries variable which can be accessed by both data series but i find it being reset to 0 when the program jumps from the secondary to the primary bar series. What do i need to do?

    #2
    If you create your variables in the Variables region of your code it will not be overwritten.

    private bool someVariable = false;

    Whatever you set it to in OnBarUpdate() is what it will remain until further changes. It doesn't matter which bar series you would be in when processing the value of someVariable.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    55 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    142 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X