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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    607 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    353 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    561 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X