Forums › ProRealTime English forum › ProOrder support › 3 Candle Strategy › Reply To: 3 Candle Strategy
Current Candle is always 0…
Yes, but we have to exactly define what CURRENT means, NOT the candle being formed since it cannot be accessed, but the MOST RECENTLY closed one!
Even with MTF support candles can only be accessed at CLOSING time, the only advantage is that we can use lower TF’s to access data while the candle in the bigger picture is being formed!
So, to recap, [0], or no brackets at all, references the most recenty closed candle.
At lines 16-17, 25-26, SL & TP are calculated on CLOSE (or CLOSE[0]). It will become [1] when the new one (where a trade has been opened) will close thus becoming [0] itself. Whenever a candle closes there’s a shift in the numbering (referencing) system, so that [0] ALWAYS references the most recently closed one! That’s the reason you have to calculate SL & TP only once when entering a trade, otherwise they (since they reference CLOSE) would be recalculated each new bar!