The indicator buffer is showing an unusually large number like '5161657722...' in the Data Window.. Please help me solve it...
large number could be
EMPTY_VALUE which you define in code
Nope.
It's uninitialized buffers. Look for // INIT comment where i tried to intialize
Great! So as per feedback, you should initialize buffers and then further troubleshoot, for example
if(rates_total < swingLength * 2) return 0; ArraySetAsSeries(time, true); ArraySetAsSeries(open, true); ArraySetAsSeries(high, true); ArraySetAsSeries(low, true); ArraySetAsSeries(close, true); for(int bar = swingLength; bar < MathMin(rates_total - shiftOffset, maxBars); bar++) { Up_BOS[bar] = EMPTY_VALUE; // INIT Down_BOS[bar] = EMPTY_VALUE; //INIT bool isSwingHigh = true; bool isSwingLow = true; for(int j = 1; j <= swingLength; j++) { if(high[bar] <= high[bar - j] || high[bar] <= high[bar + j]) isSwingHigh = false; if(low[bar] >= low[bar - j] || low[bar] >= low[bar + j]) isSwingLow = false; } if(isSwingHigh) { double swing_H = high[bar]; drawSwingPoint("SwingPoint_H_" + IntegerToString(bar), time[bar], swing_H, 217, clrBlue, -1); for(int i = bar - 1; i >= MathMax(0, bar - 100); i--) { if(i + shiftOffset >= rates_total) continue; if(close[i] > swing_H && close[i + shiftOffset] > swing_H) { drawBreakLevel("BreakUP_" + IntegerToString(bar), time[bar], swing_H, time[i + shiftOffset], swing_H, clrDodgerBlue, -1); Up_BOS[bar] = swing_H; break; } } } if(isSwingLow) { double swing_L = low[bar]; drawSwingPoint("SwingPoint_L_" + IntegerToString(bar), time[bar], swing_L, 218, clrRed, 1); for(int i = bar - 1; i >= MathMax(0, bar - 100); i--) { if(i + shiftOffset >= rates_total) continue; if(close[i] < swing_L && close[i + shiftOffset] < swing_L) { drawBreakLevel("BreakDown_" + IntegerToString(bar), time[bar], swing_L, time[i + shiftOffset], swing_L, clrRed, 1); Down_BOS[bar] = swing_L; break; } } } }
- www.mql5.com
Great! So as per feedback, you should initialize buffers and then further troubleshoot, for example
Sorry, I didn't mind the 'EMPTY_VALUE' code.
Thank you for helping to me 🙏
Visualizing data gaps (empty elements) - Creating application programs - MQL5 Programming for Traders - MetaTrader 5 algorithmic/automatic trading language manual
Thank you for sharing the link with me 🙏
👆 Please see the screenshot (Yellow Colour Marked).

The indicator buffer is displaying an unusually large number like '5161657722...' in the Data Window, which seems to be a bug. The chart is correctly plotting Downward & Upward arrows, but the corresponding buffer value is incorrect. Please help me fix this issue.
👆 Please see the blue colour marked in the screenshot
The upward and downward arrows are plotted correctly on the chart. However, in the Data Window, both 'UP Trend' and 'Down Trend' buffers are showing the same value. This seems to be a bug in the indicator. Please help me fix this issue.
Indicator Code :-
I tested the indicator in the Strategy Tester, and it displayed the buffer values correctly — everything worked.
However, if the results different between the Strategy Tester and the live chart,
Please try attaching the indicator to a 'GBPUSD' or any symbol chart on the Daily timeframe to verify the issue.