Short or long only by code
Hi,
Is it possible to oblige an EA to trade only long or short from code. I know it's possible manualy, but by code?
If, yes what command have to use please?
Thanks
If you want it to trade only long then wherever your code would open a short, remove the OrderSend
You could also open the common tab of the EA's inputs window and select which way you want to trade
You could use a couple of flags
bool buy_allowed = true, sell_allowed = false;
if(buy_allowed && /*logic to trigger buy*/) OrderSend(_Symbol,OP_BUY,... )
You could use a couple of flags
Thanks so much,
but I'm sorry I see I haven't ask my question correctly.
That I have forgot to mention, is to change EA setting in only buy or short, from an other chart/EA.
Thank's.
Thanks so much,
but I'm sorry I see I haven't ask my question correctly.
That I have forgot to mention, is to change EA setting in only buy or short, from an other chart/EA.
Thank's.
Same principle, but use Global Variables of the Terminal
- docs.mql4.com
Hi,
Is it possible to oblige an EA to trade only long or short from code. I know it's possible manualy, but by code?
If, yes what command have to use please?
Thanks