ZeroLag TrendCandle is a real-time development detection instrument that applies non-repainting candle coloring primarily based on a complicated Williams P.c Vary (WPR) evaluation. It highlights development shifts, momentum adjustments, and potential reversals via a dynamic color-coded system—permitting merchants to immediately perceive present market route with a clear, intuitive chart, as proven within the photos. At a look, you may clearly determine the prevailing momentum and its energy.
Core Options:
No Repaint
- No repaint, no backpainting, no sign disappearance, and no false alerts throughout reside buying and selling –Please check with the detailed technical rationalization under.- What you see on the chart stays there.
Dwell Detection (Zero Lag)
- Indicators are generated immediately after the closing of the present candle—no delays, no recalculations. This ensures you at all times react to confirmed market strikes, not lagging ones.
Works on All Belongings and Timeframes
Absolutely appropriate with:
- Foreign exchange pairs (majors, minors, exotics)
- Commodities (Gold, Silver, Oil)
- Indices (S&P500, NASDAQ, DAX, FTSE, and many others.)
- Cryptocurrencies (Bitcoin, Ethereum, and many others., relying in your dealer)
- Futures and CFDs
- Shares (if supported by your dealer)
- All timeframes (from M1 to MN)
Clear Candle Coloration Logic
- Inexperienced: Bullish candle with bullish momentum (sign is triggered when a grey candle turns inexperienced)
- Olive: Bullish candle with bearish strain (signifies doable reversal or battle of forces)
- Pink: Bearish candle with bearish momentum (sign is triggered when a grey candle turns pink)
- Orange: Bearish candle with bullish strain (signifies doable reversal or battle of forces)
- Grey: Impartial or undecided state (no sign is issued whereas candles stay grey)
- Blue: Present forming candle (coloration is just finalized at its shut)
Good Alerts System
- The indicator gives configurable alerts through popup, sound, e-mail, and push notification. Alerts are solely triggered when a brand new inexperienced candle (purchase) or pink candle (promote) seems after a number of grey candles. This avoids noise and focuses solely on confirmed transitions.
Versatile WPR-Based mostly Pattern Logic
- The underlying WPR calculation adapts to market adjustments. You’ll be able to customise the SensitivityLevel and WPR Interval to fine-tune the indicator on your most popular asset, timeframe, or buying and selling fashion.
Customizable Chart Look
For a extra snug buying and selling expertise, the indicator means that you can alter visible settings straight from its parameters:
- Allow or disable the grid
- Customise candle colours
- Change the background coloration
- Modify axis, scale, and textual content coloration
- Present or conceal quantity and customise its coloration
This indicator has been designed to strictly keep away from any type of repainting, backpainting, or false visible suggestions. Here is how its inner logic ensures clear and dependable habits:
1. Indicators are solely outlined on the earlier candle (bar == 1)
The system solely evaluates and finalizes alerts on bar index 1 (i.e., probably the most lately closed candle). The present candle (bar == 0) isn’t used to verify or set off entries.
2. The present candle (bar == 0) exhibits solely a brief visible coloration
A particular buffer coloration (code 5) is used to mark the forming candle, purely for readability. It is a visible assist and has no impact on sign technology.
3. Ultimate coloration is fastened in buffer ExtColorsBuffer[1]
As soon as bar 1 is closed, its coloration is saved within the coloration buffer and isn’t overwritten in future OnCalculate() calls.
4. No use of dangerous logic like iBarShift, Time[0], or backward recalculations
These capabilities are sometimes sources of repainting. This indicator avoids them completely.
5. Indicators stay seen and unchanged after rendering
The loop construction ( for (int bar = restrict; bar >= 0; bar–) ) updates candle buffers with out deleting previous values. What you see on the chart stays there.
6. It makes use of customary iWPR as sign base
The logic is constructed across the Williams P.c Vary (WPR), a typical MetaTrader indicator that doesn’t repaint by design.
7. Knowledge is obtained straight utilizing CopyBuffer with out reinterpretation
CopyBuffer is used to fetch uncooked WPR values with out modifying or shifting the information dynamically. This ensures sign integrity.
Conclusion:
No repaint, no false refresh, no retroactive adjustments. What you see is strictly what was there on the time of the sign — even when you reload the chart later.
Technical Notice: Why iWPR doesn’t repaint
The Williams P.c Vary (iWPR) is a built-in MetaTrader indicator that doesn’t repaint, so long as it’s used appropriately. Its calculation is predicated on the highest excessive, lowest low, and shut of the final N closed candles—that means as soon as a candle closes, the corresponding WPR worth turns into last and doesn’t change.
This indicator makes use of CopyBuffer() to entry WPR values straight from the terminal’s inner buffer, with out making use of any dynamic reinterpretation or shifting logic. Moreover, the logic solely references candle bar == 1 (i.e., the final totally closed candle), which ensures all WPR values used for sign technology are secure and confirmed.
In consequence, iWPR is totally non-repainting by design, and this indicator preserves that integrity with strict buffer dealing with and sign timing.
For any questions or inquiries, please ship a non-public message and I’ll reply as quickly as doable!