I have seen for loop here works tick wise. How to run the loop bar wise?
I want to add +1 pip from the low in per bar in 1 minute chart. I am creating Gann 1x1 Angles, where for each bar angle will rise +1 pip upto 120 bars.
if( LowT < HighT) // If low formed first
for( i = LowT; i < (LowT + (7200)); i++) // Time counting for next 2 hours
for (int k = 0; k <120; k++)
A = low + ((double)k * CalcPoint); // Adding 0.0001 with k
printf(StringConcatenate("Low angle = ",DoubleToString(A,5)));
for( i = LowT; i < (LowT + (7200)); i++)
Sorry to put it in that way. Here I explain with examples.
Suppose I draw Gann angle 1x1 from 50 which is a low. Now According to the Angle methods, it grows 1 pip per unit of time (i.e current chart bar). In following way.
Angle  = 50 at T time
Angle  = 51 at T1 time
Angle  = 52 at T3 time.
...... upto Angle 
Now I need to store this data & compare with "Ask" price, so every time "Ask" = "Angle[i]" , I buy. Now with above code I try to calculate angle levels. But " for" loop is adding +1 with the low with each tick, not with each current bar.
To add comments, please log in or register