01005379:
Hello!
I want my EA to open new order when price is x-pips from last open order. EA opens buy when price is x-pips over last candle close. Then I want to open another buy when price is x-pips over from last open buy. I try like this but doesn't work. Thanks!
First you need to loop throug all orders to determine the highest open buy/lowest open sell.
After the loop you can open the new one .. if (Close[0]>LastBuyPrice+x*Point) OrderSend(:::)
Isn't this loop throug all orders?
for(cnt=OrdersTotal()-1;cnt>=0;cnt--)
can i c please what the var. Ordersdifference contains
It extern variable.
extern double Ordersdifference=0.0003;
try to use NormalizeDouble for that
Problem is that EA opens many orders when rule is OK. For BUY it opens one order, but then when price goes up about 3pips it opens many orders and not only one as I want. Maybe it does't chack last order open price...
qjol:
oops check out MarketInfo(Symbol(),MODE_STOPLEVEL)
i think it's to small 0.003
But there is no stop level or take profit level. Why would there be a problem?
01005379:
Problem is that EA opens many orders when rule is OK. For BUY it opens one order, but then when price goes up about 3pips it opens many orders and not only one as I want. Maybe it does't chack last order open price...
Problem is that EA opens many orders when rule is OK. For BUY it opens one order, but then when price goes up about 3pips it opens many orders and not only one as I want. Maybe it does't chack last order open price...
use return
Can you please tell me where and why?
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 want my EA to open new order when price is x-pips from last open order. EA opens buy when price is x-pips over last candle close. Then I want to open another buy when price is x-pips over from last open buy. I try like this but doesn't work. Thanks!