portharcourt: Thank you for your help
|
Ok, thank you. I'm sorry.
I'll try to solve and post questions just for specific doubts non my attempts
To get more understanding:
In Mql4 there are a lot of examples of different ea's: https://book.mql4.com/appendix/examples
Look on youtube: Seacrch " MQL4 Programming" , " jimdandy " does a lot of videos to learn MQL4.
For what you want a few ways to do it:
1/Read account History , Checking the last trades close Time.
2/Create a Static,
Good Luck with learning MQL4.
Thank you both for your suggestions and for providing such useful links.
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 everybody,
I'm just a beginner trying to build up very simple EAs. At the moment I'm able to build the just using standard indicators for enter or exit conditions.
Actually I'm testing a very stupid EA just for practice where the buy enter rule is something like:
if (close[1]>open[1])&&(close[2]>open[2])
and buy exit rule is
if (close[1]<open[1])
Viceversa the sell enter rule is
if (close[1]<open[1])&&(close[2]<open[2])
and sell exit is:
if (close[1]>open[1])
I'm not expecting that this works for making money but I'm looking for someone who could explain how to write this additional condition:
if the candle at time [1] makes me exit from the market (e.g. close[1]<open[1] for buy exit) and at the same time this condition satisfies an enter in the market (e.g enter sell), do not enter:
never enter if on previous candle there was an exit from the market.
Thank you for your help