I am using renko charts, but the fact that the 'timeframe is lost' is a major disadvantage to use them.
Does anyone know how to create 3 or 4-digits charts on mt4 out of 5-digits charts using another method? Is that even possible?
Kind regards, Rok
You can make a hst file (history file) with as much decimals (digits) as you wish and then open it in offline mode.
It is just a matter how many digits you specify in the hst file part that is reserved for that and proper rounding when one writes the values to the file (even though digits are specified, if the value written to such a file is not rounded to proper number of digits will still have actuall values).
Here is an example what happens in cases when digits are specified and rounding have not been done ( those values should all have been 1.03, but as you can see they are not. That, btw, might explain some problems we are having in comparison of price values - if a broker did not round them down to the number of digits, we would get exactly the same case as on the picture)
Thank you for your answer Mladen!
Do you maybe know for any script or indicator that could create offline chart with rounded numbers?
For the basics how it is done you can take a look at this script : https://www.mql5.com/en/forum/175504
Find the line that goes like this
and replace Digitswith the number of decimal places you wish to use
If you delete the existing run-time history files it will write new ones with the smaller number of decimals. To round up the prices, you will have to replace this block :
FileWriteDouble(ExtHandle, d_low, DOUBLE_VALUE);
FileWriteDouble(ExtHandle, d_high, DOUBLE_VALUE);
FileWriteDouble(ExtHandle, d_close, DOUBLE_VALUE);[/PHP]
with something like this :
[PHP] FileWriteDouble(ExtHandle, NormalizeDouble(d_open,YourDigits), DOUBLE_VALUE);
FileWriteDouble(ExtHandle, NormalizeDouble(d_low,YourDigits), DOUBLE_VALUE);
FileWriteDouble(ExtHandle, NormalizeDouble(d_high,YourDigits), DOUBLE_VALUE);
Please enable the necessary setting in your browser, otherwise you will not be able to log in.