Hi please try
DoubleToString(RichterScale,0) or (string)RichterScale,
But here goes... The code below compiles fine, however I cannot get the RichterScale calculation to post the needed calculation in MetaTrader.
Given that “MaxVolumeVal” is a long and that "Volume[]" might also be a long, then should the value of "MaxVolumeVal" be greater than "Volume[0]", then the result will always be 0 because you are carrying out integer division (ie. a long divided by a long).
Example: for integer division 1/2 = 0, 3/4 = 0, while floating point division, 1/2 = 0.5, 3/4 = 0.75
So, you will have to work with doubles or at least cast the longs to doubles to get a meaningful value. Obviously, "RichterScale" will also have to a double.
This also applies to other variables, such as "AverageVolume", etc.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Good morning
I have a feeling there is a simple fix to the solution and I risk looking super dumb.
But here goes...
The code below compiles fine, however I cannot get the RichterScale calculation to post the needed calculation in MetaTrader.