
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 there,
I'm having difficulties programming an EA to execute orders after 4 down/up bars. I want it to consider only the bars in the same day but it executes orders based on the previous day last bars. For example, if the last 4 bars of the previous day where positive it will buy within the first bar of the new day if price is higuer than previous day's last 4 bar range. It is a simple code:
Then I have an "if" statment which compares the last 4 open and close prices to check if they are all up or down bars.
I have put together a datetime structure to open and close orders within the day and that works fine.
I am a beginner so I apologize for my poor coding and thank in advance.
Best regards