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
Hello
I am quite new in mql4 programming and recently I build my own EA which should execute pending and market orders at a specified price.
So, this is the code I wrote and yeah there is so much junk, but it works. The only problem I am facing is when I look at the results after running the EA I see that, for some days EA opens and closes the orders at the exact order like X.XXXX56, then it changes this to X.XXXX71 or less, I never changed the opening and closing pending orders a bit in the code, I wonder does market opening and closing times matter in this case?
My algorithm is simple ( the code i shared is too messy, i'm sorry for that )
TP 30 pips
BUY 0.05 LOT
Range 10 pips
SELL 0.07 LOT
SL 40 pips
it should keep going if it keeps consolidating with increased number of lots, but, if it hits TP or SL in any case everything should close and I start with another buy order. Buy while testing I see that it works for some time, then fails to open buy stop order changing the x.xxxx16 to x.xxxx35, I don't just understand why it's not doing this always and making EA fail only in 3-4 times a year?
Please help