problem to convert tick to double
Hello, i'm creating a volume at price indicator.
but after receiving the value I don't know how to convert ..
MqlTick tick_array[];
double volume1m [10];
CopyTicks(_Symbol,tick_array,COPY_TICKS_TRADE,0,2000);
the problem is here:
volume1m[1] += tick_array[0].volume;
Print (volume1m[1] );
I get similar value to this: 4.654716935610645e-212
could someone help me ?
You did not initialize volume1m[1] to 0 prior to adding some value to it
Makes no sense. tick_array[0].last and volume1m[0] are already doubles.
I found the problem!
the problem is:
IF tick_array[0].volume is 0 and the variable took it
if i use
if (volume1m[0] > 0) { Print(); // it enters and returns encrypted value }
volume1m should be 0, becouse it took the value 0 from tick_array.. BUT NO :(
So i change to >
if (tick_array[0].last > 0) { volume1m[0] = tick_array[uz].last; } if (volume1m[0] > 0) { Print(); }
and solved my problem
thank you!
Hello, i'm creating a volume at price indicator.
but after receiving the value I don't know how to convert ..
could someone help me ?