I haven't see any broker that requires stops on full pip values. Stops must be at least stoplevel*point away from market.
Also for me this is new. Stoplevel Freezelevel are checkt. Additionally i cannot set the stop manually if it's not a full pip value. (The sending of the ordermodification works, but error 130 is returned.
Perhaps because it's a Stock Index, the broker plays by a different rule. 4/5 digits as I understand it means... digits after the decimal point. 7123.x would mean one(1) digit to me. The way I would solve this problem is to ask IF dax and then round the stops to the nearest whole number (or normalize(x,1) if that's what it allows). And no... I don't know a command to show if it accepts whole number stops only :) Cheers.
I should have written 0/1 digits here. But the rounding is done with the Digit command, and i am not using any pip/point's as input. The use for this script is to set the stops of all open orders to breakeven (after scaling in). It seems i have to round to the next positive full pip value in cas i am trading dax. But that would require a modification of the scrpits on each new stock i trade. (Not have tried any other yet, but who knows)
If someone is intrested in, i found the solution. Stops need to be rounded to MODE_TICKSIZE
- what is the ticksize?
- Are you adjusting slippage (pips) to points (OrderSend)
MarketInfo(Symbol(),MODE_TICKSIZE) returns 0.5 for DE30
MarketInfo(Symbol(),MODE_DIGITS) return 1
I am not using any pips/slippage modifications, since all the script have to do is setting the stoploss of multiple orders to breakeven.
I am allowed only to place stops at values XXXX.5 or XXXX.0, modifications to all other subpip values gets rejected with error 130.
Addon:
The common 4/5 digit modification will also fail.
A possible modification would be:
if(Digits%2==0){ //only full pips }else{ //subpips }
This code will fail at Gold and Silver. Still no bulletproof solutions for pip/subpip modifications :(
MarketInfo(Symbol(),MODE_TICKSIZE) returns 0.5 for DE30
MarketInfo(Symbol(),MODE_DIGITS) return 1
I am not using any pips/slippage modifications, since all the script have to do is setting the stoploss of multiple orders to breakeven.
I am allowed only to place stops at values XXXX.5 or XXXX.0, modifications to all other subpip values gets rejected with error 130.
double minLot = MarketInfo(Symbol(), MODE_MINLOT), lotStep = MarketInfo(Symbol(), MODE_LOTSTEP), lotSize = MathFloor(lotSize/lotStep)*lotStep; if (lotSize < minLot) ...open price must be a multiple of tick size
double tickSize = MarketInfo(Symbol(), MODE_TICKSIZE); nowOpen = MathRound(nowOpen/tickSize)*tickSize;

- 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,
lately i trade a bit the dax. My Broker offers a 5 digit stream and so also on the dax i have 7123.x stream
My range of supporting scripts uses 4/5 digit adjustment but fails of course on the dax, because even if the stream is 5digits i am allowed only to set the stops at full pip values. 7000.0 for example. How can i locate this issue using mql4.
Of course i can use only Digit-1 in the normalization process, but then it would affect also all other symbols where i am allowed to place stops at sub pip level.
Any ideas?
//z