ZeroLag TrendCandle is a real-time pattern detection device that applies non-repainting candle coloring based mostly on a complicated Williams % Vary (WPR) evaluation. It highlights pattern shifts, momentum modifications, and potential reversals via a dynamic color-coded system—permitting merchants to immediately perceive present market path with a clear, intuitive chart, as proven within the photographs. At a look, you possibly can clearly establish the prevailing momentum and its energy.
Core Options:
No Repaint
- No repaint, no backpainting, no sign disappearance, and no false alerts throughout stay buying and selling –Please discuss with the detailed technical rationalization under.- What you see on the chart stays there.
Reside 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 Property and Timeframes
Absolutely appropriate with:
- Foreign exchange pairs (majors, minors, exotics)
- Commodities (Gold, Silver, Oil)
- Indices (S&P500, NASDAQ, DAX, FTSE, and so on.)
- Cryptocurrencies (Bitcoin, Ethereum, and so on., relying in your dealer)
- Futures and CFDs
- Shares (if supported by your dealer)
- All timeframes (from M1 to MN)
Clear Candle Colour 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 crimson)
- 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 (colour is barely finalized at its shut)
Good Alerts System
- The indicator affords configurable alerts through popup, sound, e-mail, and push notification. Alerts are solely triggered when a brand new inexperienced candle (purchase) or crimson 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 modifications. You’ll be able to customise the SensitivityLevel and WPR Interval to fine-tune the indicator in your most well-liked asset, timeframe, or buying and selling type.
Customizable Chart Look
For a extra snug buying and selling expertise, the indicator lets you regulate visible settings straight from its parameters:
- Allow or disable the grid
- Customise candle colours
- Change the background colour
- Modify axis, scale, and textual content colour
- Present or disguise quantity and customise its colour
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 conduct:
1. Indicators are solely outlined on the earlier candle (bar == 1)
The system solely evaluates and finalizes alerts on bar index 1 (i.e., essentially the most not too long ago closed candle). The present candle (bar == 0) is rarely used to substantiate or set off entries.
2. The present candle (bar == 0) reveals solely a short lived visible colour
A particular buffer colour (code 5) is used to mark the forming candle, purely for readability. It is a visible support and has no impact on sign era.
3. Ultimate colour is fastened in buffer ExtColorsBuffer[1]
As soon as bar 1 is closed, its colour is saved within the colour buffer and is rarely overwritten in future OnCalculate() calls.
4. No use of dangerous logic like iBarShift, Time[0], or backward recalculations
These features 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 commonplace iWPR as sign base
The logic is constructed across the Williams % Vary (WPR), an ordinary MetaTrader indicator that doesn’t repaint by design.
7. Information 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 modifications. What you see is precisely what was there on the time of the sign — even in case you reload the chart later.
Technical Word: Why iWPR doesn’t repaint
The Williams % Vary (iWPR) is a built-in MetaTrader indicator that doesn’t repaint, so long as it’s used accurately. 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 era are steady 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!



