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 cmoran13, Yesterday, 01:02 PM
    0 responses
    29 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    21 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X