Got the info in the bathroom,
RefreshRates();
if (OrderOpenPrice()<Ask){
Ha ha ha silly me.
case closed.
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
How to say " if an actual price move up, above the current OrderOpenPrice() B23 in this example, make S22 with the price 40pt below B23".
i tried with this :
if (B23open(OP_BUY)==1 && change23set()==1){
for (int b23=0;b23<OrdersTotal();b23++){
OrderSelect(b23,SELECT_BY_POS);
if (OrderMagicNumber()==Magic_Number_B+23){
RefreshRates();
double askb23=MarketInfo(Symbol(),MODE_ASK);
if (OrderOpenPrice()<askb23){
sendSell(OrderOpenPrice(),Magic_Number_S+22,XFactor*CoB,com+"S22",sl2,r2,sp,tp2);
return(0);
}
}
}
}
But the result is S22 is opened 40pt below the last opened order price, to farr below???
How to define if (OrderOpenPrice()<actual price){ ?
Thank you
k.