luisneves:
Hi all,
I have an issue with the open of an order,
I want open an order every time the Bid moves by a certain value. So If I make use of
With the above the order do not open when Bid moves by PriceStep. If I modify the code as follow;
As soon the ea starts and order will open no matter the PriceStep value.
Could anyone clarify me where I'm wrong ?
Thank you in advance
Luis
check your posting we can not see a change in the modified code
we see two times
if(Bid == 0 || Bid < price) { price = Bid; } else if((Bid - price)/Point >= PriceStep) {//5 RefreshRates(); BuyTicket = OrderSend(Symbol(),OP_BUY,LotSize,Ask,Slippage*pips2points,0,0,"Initial Buy Order",MagicNumber,0,Green); price = Bid; if(BuyTicket > -1)
so your posting has to be wrong
luisneves: I want open an order every time the Bid moves by a certain value. So If I make use of
Init is only called once, bid will never move
int init ()

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 deVries and WHRoeder,
Thank you for your prompt response. Follow is last post updated.
I have an issue with the open of an order,
I want open an order every time the Bid moves by a certain value. So If I make use of ;
int start();
With the above the order do not open when Bid moves by PriceStep. If I modify the code as follow;
As soon the ea starts and order will open no matter the PriceStep value.
Could anyone clarify me where I'm wrong ?
Thank you in advance
Luis