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
That isn't what OP asked. “I'm trying to make my EA to open a single long trade ONLY.”
That isn't what OP asked. “I'm trying to make my EA to open a single long trade ONLY.”
Is there anyway to know if a trade is long or short through a if?
Of course, but I can't answer since I don't know MT5 enough.
Is there anyway to know if a trade is long or short through a if?
Yes, you can use PositionGetInteger(POSITION_TYPE) then check if its equal to POSITION_TYPE_BUY or POSITION_TYPE_SELL.
You can say in the OnTick() function