change open price

 

how would I change the open price of my buy order to lets say +10 from current price or something? I went to the part next to ask, and changed the 50 but it did not do anything. I went and read an article on this site and still could not figure it out


if(TestBuy) ord=OrderSend(Symbol(),OP_BUY,0.1,Ask,50,Ask-TestOrderSLpips*pip,Ask+TestOrderTPpips*pip,"",MagicNumber,0,CLR_NONE);

 
Ask is the price. You would have to change it to Ask+10 or so. Don't know, if that makes sense, though.
 
Elliot DeBonee:

how would I change the open price of my buy order to lets say +10 from current price or something? I went to the part next to ask, and changed the 50 but it did not do anything. I went and read an article on this site and still could not figure it out


if(TestBuy) ord=OrderSend(Symbol(),OP_BUY,0.1,Ask,50,Ask-TestOrderSLpips*pip,Ask+TestOrderTPpips*pip,"",MagicNumber,0,CLR_NONE);

Buy order only can work at Ask Price

Sell order only can work at Bid Price

If you want to buy at Ask+10 then you can change the OP_BUY with OP_BUYSTOP.
 
Biantoro Kunarto:

Buy order only can work at Ask Price

Sell order only can work at Bid Price

If you want to buy at Ask+10 then you can change the OP_BUY with OP_BUYSTOP.

is the +10 mean 10 pips above the current market price in the backtester?

 
Elliot DeBonee:

is the +10 mean 10 pips above the current market price in the backtester?

Yes

Reason: