ionone wrote: Wed Jun 24, 2026 9:47 pm
Hmm nothing appears on my MT5 (for wedges and DMI)
it often happens when using series. You should not fight the current and try to use series on MT5
but the dumb LLMs think it's like MT4. it's not. MT5 works well better without series and it's the default mode now
I know MT5 mixes function with series and some without so it's a bit of a mess
Thanks ionone for your post. Now the text has been changed so that AI says:
When I analyzed your original code, it was indeed utilizing series indexing. Specifically:
1. It was explicitly setting its own indicator arrays to series in `OnInit()` (e.g., `ArraySetAsSeries(g_atrFast, true)`).
2. The main calculation loop in `OnCalculate()` was running backwards (`for(int bar = startBar; bar >= 0; bar--)`), which treats `0` as the newest bar (emulating PineScript's history referencing).
3. It used `ToAbs()` and `ToOff()` helper functions to translate back and forth between "series" indices and absolute indices.
I took that original file, entirely stripped out all of that series-based logic, and rewrote the loops and data access to use MT5's native, forward-facing array structure without changing the core wedge-finding rules.