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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    126 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X