Hello,
are you sure that it's compiling with you?
you forget a semicolon after the modification call, here it's fixed
void OnTick() { int total = OrdersTotal(); for(int cnt = 0 ; cnt < total ; cnt++) { if(OrderSelect(cnt,SELECT_BY_POS)==true) { if (OrderSymbol() == Symbol()) { if (OrderType()==OP_BUYLIMIT) { if(OrderOpenPrice()!= Bid){ bool olimitbuy=OrderModify( OrderTicket(), Bid, OrderStopLoss(),OrderTakeProfit(), 0, Blue ) ; } } } } } }
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
This part of the code doesnt work and i wonder why.. The fact is it compile correctly but it doesnt change buylimit orderopenprice() to Bid (or any other price i set).
Can someone please help me?
Thankx
void OnTick()
{
int total = OrdersTotal();
for(int cnt = 0 ; cnt < total ; cnt++) {
if(OrderSelect(cnt,SELECT_BY_POS)==true) {
if (OrderSymbol() == Symbol()) {
if (OrderType()==OP_BUYLIMIT) {
if(OrderOpenPrice()!= Bid){bool olimitbuy=OrderModify( OrderTicket(), Bid, OrderStopLoss(),OrderTakeProfit(), 0, Blue )
}
}
}
}
}
}