Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

last bar in training

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

    last bar in training

    hi guys how is possible have a body value ?, i tryed with (High[0]-Low[0]) , but return me a penultimate candel
    thankz

    #2
    Hello faustf,

    Thanks for your post.

    The definition of "penultimate" is "last but one in a series of things; second last.", so is your question why does the index[0] point to the prior closed bar and not the currently forming one or is your question as stated "how is possible have a body value"?

    If penultimate is the issue and you really want the current forming candle, then you would change the CalculateOnBarClose from true to false as this will then make the index of [0] point to the currently forming bar and [1] would now be the penultimate bar. Please note that in this mode, the Open value will not change but the Close value will continually change until the bar is completely closed. The penultimate bars values will not change.

    To get the body value of the candle, the body is defined as the distance between the Close and Open points of the candle, so Close[0] -Open[0] (or Open[0] - Close[0]) Reference: https://en.wikipedia.org/wiki/Candlestick_chart

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X