On 5Digit Broker Stops are only allowed to be placed on full pip values. How to find out in mql? - page 2

 
zzuegg:

Addon:

The common 4/5 digit modification will also fail.

A possible modification would be:

This code will fail at Gold and Silver. Still no bulletproof solutions for pip/subpip modifications :(

Why Gold and Silver?
 
Gold and silver are 2 digts but subpip streams
 
I define the number of digits as
//define coefficient
if (Digits ==2 || Digits ==4) {k = 10;}   //broker 4Digit
if (Digits ==3 || Digits ==5) {k = 1;}    //broker 5Digit

//then
sl=NormalizeDouble(sl*point/k,Digits);
tp=NormalizeDouble(tp*point/k,Digits);