What can you tell me about MT4 errors?
> Question.
Every time a tick moves, it adds 0.01 to the output, but in the middle of the output, I get a bug like 0.07000000000001 instead of 0.07.
>What I did
I have checked and found that I should specify a decimal point, but when I use NormalizeDouble or DoubleToString, the same 0.000000001 bug appears. How can I solve this problem?
>What I want to do
I want to output a number that is added to 0.01 in the LABEL object.
But instead of 0.07, it becomes 0.070000001, so I can't display it.
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],const double &low[],
const double &close[],const long &tick_volume[],const long &volume[],const int &spread[])
{
static double count ;
count = count + 0.01 ;
//count = NormalizeDouble( count , 2 );
count = DoubleToString( count , 2 );
Alert( count );
return(rates_total);
}
> Question.
Every time a tick moves, it adds 0.01 to the output, but in the middle of the output, I get a bug like 0.07000000000001 instead of 0.07.
>What I did
I have checked and found that I should specify a decimal point, but when I use NormalizeDouble or DoubleToString, the same 0.000000001 bug appears. How can I solve this problem?
>What I want to do
I want to output a number that is added to 0.01 in the LABEL object.
But instead of 0.07, it becomes 0.070000001, so I can't display it.
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],const double &low[],
const double &close[],const long &tick_volume[],const long &volume[],const int &spread[])
{
static double count ;
count = count + 0.01 ;
//count = NormalizeDouble( count , 2 );
count = DoubleToString( count , 2 );
Alert( count );
return(rates_total);
}