angevoyageur:
Check the your object already exists before creating it : ObjectFind().
Wow, thank you. Sorted.
Check the your object already exists before creating it : ObjectFind().
if(DayOfWeek()==5 && Hour()==23 && Minute()==59 && Seconds()>=0)
- Seconds can never be negative.
- Your code assumes your broker uses NY time (UTC-4/5) + 7hours thus the market be open at server time Friday 23:59. It fails if:
- Some broker's do many do not. UTC, market closes Friday 2100/2200. UTC+2/3 (Eastern European Time) works except when that DST differs from NY DST.
- Some broker's do but close their charts minutes earlier (5minutes - 1 hour) because of lower liquidity.
- Some brokers use even later server time, so there might be a partial Saturday (Sidney.)
- There may be no ticks during the last minute.
- If Friday is a market holiday.
- Some broker's do many do not. UTC, market closes Friday 2100/2200. UTC+2/3 (Eastern European Time) works except when that DST differs from NY DST.
- Wait for DOW to go down from the previous bar and then draw.
angevoyageur: Check the your object already exists before creating it : ObjectFind().
Or use my pattern If( !Object_Move(...) ){ Object_Create(...);}
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
Hi guys,
I am trying to get my EA to draw a rectangle a specific time. When it is that specific time, it draws it, but continuously draws it after. I get error code 4200. Any ideas to ensure it draws it once..?