WHRoeder:
- I have no idea what you are trying to say. It sounds like babble.
- if LowT is a datetime, as is i, you are incrementing time. If you want to find which bar corresponds to a time, use iBarShift
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 [0] = 50 at T time
Angle [1] = 51 at T1 time
Angle [2] = 52 at T3 time.
...... upto Angle [120]
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.
You know the low (50) you know the bar index iBarShift(... T ) You know the current bar index (0) Therefor you know the "Angle" = 50 + iBarShift * pip. No loops, no arrays.
WHRoeder:
You know the low (50) you know the bar index iBarShift(... T ) You know the current bar index (0) Therefor you know the "Angle" = 50 + iBarShift * pip. No loops, no arrays.
Thank you so much! It worked with less headache...
You know the low (50) you know the bar index iBarShift(... T ) You know the current bar index (0) Therefor you know the "Angle" = 50 + iBarShift * pip. No loops, no arrays.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.