Hi
I have this code running in my EA to scan for the lowest and highest price in each session.
it runs fine on the sunday market open, then all of a sudden when 0000gmt on the monday comes, it seems to display the high and low from a week ago :( when it hits the next session open (London) it is fine the for the rest of the week, can anyone spot anything obvious? as I am fairly new to coding, all times are GMT -1
: You can see I have added conditions to try and sort the issue at the week start I think its the <7 statement.
Thanks
Antony
Anthony,
This indicator which I wrote some time ago, draws a Frame(rectangle) around each of the 4 Sessions. The left side is the Beginning of the Session, the right side the end of Session, and the Top and Bottom are High and Low for the Session(p1,p2). Look in the DrawSession function where these coordinates are computed. My broker is is NewYork and this is derived from the MarketWatch time.NewYork Session ends at Midnight Marketwatch time and is followed by Pacific Session and 2 hours later the Asian Session .. etc,etc, etc.. All Session are 9 hours long. Everything is in Arrays, so if youre new at programming this would be a good start to understand the advantage of using arrays instead of hardcoding..
Hope this helps
Guilherme
Hi
Thanks for the help :) that should point me in the right direction.
Thanks again
Antony
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I have this code running in my EA to scan for the lowest and highest price in each session.
it runs fine on the sunday market open, then all of a sudden when 0000gmt on the monday comes, it seems to display the high and low from a week ago :( when it hits the next session open (London) it is fine the for the rest of the week, can anyone spot anything obvious? as I am fairly new to coding, all times are GMT -1
: You can see I have added conditions to try and sort the issue at the week start I think its the <7 statement.
Thanks
Antony