Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing indicator last value.

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

    Accessing indicator last value.

    Hi,

    I have an indicator and in the OnBarUpdate() before using the Set method to inserting a new value I want to access the last value. What should I use indicator[0] or indicator[1]?
    For example if I want to set an indicator to the last value what should I do:
    1. Indicator.Set(Indicator[0])
    or
    2. Indicator.Set(Indicator[1])

    I hope I made my self clear :-)

    Thanks in advance!
    Last edited by freewind; 02-20-2011, 03:42 AM.

    #2
    The most current value would be setting at index position 0, with CalculateOnBarClose determining if you get the last value of the current developing bar (false, in RT only) or the value of the last closed bar (true, backtesting default).

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    89 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    133 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X