if(BarsInProgress == 0) { hClose.Set(1,Close[1]); } if(BarsInProgress == 1 && CurrentBars[baseBars] > 1) { hClose.Set(Closes[1][0]); }
I have verified the that both series are as expected by printing to the output window.
So the problem I am having is when I call a 20 period ATR on my data-series I dont get the result expected. It is approximately half what it should be,
When I compair ATR(Closes[0], 20)[0] & ATR(hClose, 20)[0] here is a sample of what I get with the inputs to them:-
***********
***********
Current 1 Tick Bar 537582 ATR last 20 Closes 164.32 164.31 164.25 164.21 164.21 164.23 164.2 164.19 164.18 164.2 164.2 164.23 164.22 164.25 164.29 164.35 164.28 164.31 164.3 164.31
Current 1 Tick Bar 537582 ATR last 20 hClose 164.31 164.31 164.25 164.21 164.21 164.23 164.2 164.19 164.18 164.2 164.2 164.23 164.22 164.25 164.29 164.35 164.28 164.31 164.3 164.31
ATR 0.0730076458405191
ATR hCLose 0.0365543132310812
***********
***********
Current 1 Tick Bar 537583 ATR last 20 Closes 164.32 164.31 164.25 164.21 164.21 164.23 164.2 164.19 164.18 164.2 164.2 164.23 164.22 164.25 164.29 164.35 164.28 164.31 164.3 164.31
Current 1 Tick Bar 537583 ATR last 20 hClose 164.32 164.31 164.25 164.21 164.21 164.23 164.2 164.19 164.18 164.2 164.2 164.23 164.22 164.25 164.29 164.35 164.28 164.31 164.3 164.31
ATR 0.0730076458405191
ATR hCLose 0.0365543132310812
***********
***********
I cant figure out why they would be different ?
Comment