5 Digits Adjustment

 

i am just wondering if a 5 digit adjustment is still needed today? or it's a thing for the past

Example:

int     vpoints;
double  vpips;   
if (Digits == 3 || Digits == 5)//Adjust for five (5) digit brokers.
{
   vpips = Point*10;
   vpoints = 10;
}
else
{
   vpips = points;
   vpoints = 1;
}

Thanks

Chew

 
Hey Chew

Yes, if you plan to give your code to other people, it's still needed mate. There are still 4 digit brokers out there. And if it's just for you and you use a 5 digit broker, you will need it. But if it's just for you and you always use 4 digit broker, then no
 
Stuart Browne:
Hey Chew

Yes, if you plan to give your code to other people, it's still needed mate. There are still 4 digit brokers out there. And if it's just for you and you use a 5 digit broker, you will need it. But if it's just for you and you always use 4 digit broker, then no

How about I just use Point function? Will there be a 4 Digit broker that return me 5 decimal point, 0.00001 point?

Example:

extern int stoploss = 100
extern double takeprofit = 400

double SL = NormalizeDouble(stoploss*Point, Digits);
double TP = NormalizeDouble(takeprofit*Point, Digits);

 
Teck Hua Chew:

How about I just use Point function? Will there be a 4 Digit broker that return me 5 decimal point, 0.00001 point?

Example:


 I usually use like below


extern double stoploss = 100; // same for 4digits or 5digits
extern double takeprofit = 400; // same for 4digits or 5digits

double poen;

if (Digits==3 || Digits==5) poen=10*Point; else poen=Point;


double SL = NormalizeDouble(stoploss*poen, Digits);
double TP = NormalizeDouble(takeprofit*poen, Digits);