are DPO and TDI indicators faulty ??
2 replies
krzysiaczek99
10 months ago #279971
Hi all,
I had a quick look to the code of DPO and TDI indicators and I’m a bit confused. As per comment in the code in various places very first (the oldest) bar has the index 0. In this case trading engine starts to calculate indicators values from bar 0 to the last bar. In such situation any calculations using lookback periods in loops should decrease not increase array index, so in loops in those indicators. (line 126 and line 51) i– should be used instead of i++. This bug cause future leak and overperformance of used strategies.
Or I misunderstood something ?? See attachment.
Krzysztof

tomas262
10 months ago #280026
krzysiaczek99
10 months ago #280049
Thanks for reply, i believe I know what was my issue. When you start new indicator in QE there is a comment
Viewing 2 replies - 1 through 2 (of 2 total)