I think
1) OrderSelect takes 3 parameters in this context.
2) pips2dbl is probably wrong for this broker.
I think
1) OrderSelect takes 3 parameters in this context.
2) pips2dbl is probably wrong for this broker.
1) i have changed it into OrderSelect(x,SELECT_BY_POS, MODE_TRADES); but no difference. the SL is somehow set 120pips below, instead of 10 (for example)
2) pips2dbl is correct working in same way with other ea's i made. it's just to adjust for my 5 digit broker (go markets). Got it once from WHRoeder i think.
if (Digits == 5 || Digits == 3) { // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0;
can't tell without seeing the entire codes.
agreed. Are you sure about the 10? Any init() containing x *= y;
OrderSelect takes 3 arguments, the 3rd has a default = mode_trades.
Should always test return codes.for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == magic.number // my magic number && OrderSymbol() == Symbol() ){ // and my pair.
if (!OrderModify(OrderTicket(),OrderOpenPrice(),Ask-bebuy*pips2dbl,NULL,0,CLR_NONE)) Alert("OrderModify failed: ", GetLastError());
agreed. Are you sure about the 10? Any init() containing x *= y;
OrderSelect takes 3 arguments, the 3rd has a default = mode_trades.
Should always test return codes.Thans for the reply, i have sent the whole EA code to you. Hope you can see the fault in there.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
HI,
ik got a double variable named bebuy which has the number 10 in it.
I want to use the following to modify the stoploss, but somehow instead of Ask-bebuy(=Ask-10 pips), it puts the SL maybe 200 pips lower?
I believe i use something wrong in the syntax, but can't see it. Who can help me with this?