![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
4. Get into the habit of ALWAYS testing. You never know where and when something could go wrong!
6. Dukascopy data is 5 digits. I don't know where you are getting 4 digits. Either way, don't assume. Use the "Digits" or "_Digits" for the Symbol in question.
7. Producing ".hst" files, will not allow you to be able to back-test range bars. To do that, you have to produce ".fxt" files and not ".hst" files. I know this for a fact, because I do this every day on my own setup to produce my own ADBars (a propriety bar format of my own). Producing ".hst" files on top of standard time-frames is not the answer, as you will loose all the tick data for the test, as it will just generate "pseudo" tick data build up from the HST files.
8. I am using 48 in my own code, but there may be another 4 bytes padding somewhere else accounting for the discrepancy. I will have to check and get back to you on this one. See edit below.
EDIT: Point 8. Figured out why using 48 or 52 makes no difference, because the FileWriteArray Count is based on the array type and number of elements and not on bytes. So in actual fact the correct value would be 13. So 48, 52 or any other value greater than 13, will always give the same result; because the array only has 13 elements and no more. So your way, of not mentioning the number of elements is correct, and I will change my own code accordingly.
6. Yes. Afterwards I checked and Dukascopy is 5 digits, dont know why I thought it was 4.
7. I already have the fxt files from Dukascopy, all I need to do is produce the HST, thought that was clear.
No, it was not clear, as you had only mentioned Dukascopy once before with very little detail with no mention of FXT files. However, when I mentioned generating an FXT file, I did not mean the standard FXT files associated with standard time-frames. I meant a non-standard FXT file, which defines the bar states as per your requirement of Range Bars.
That is what I do for my own ADB (Adaptive Dynamic Bars), which are a kind of Constant Duration/Range/Volume Bar that adjust to all three dimensions (Time, Price, and Volume).
However, for your case specifically, there is a 3rd party tool named FXTBuilder that produces FXT files for testing Range bars, but since the developer is a well known user here, and I probably am not allowed to "advertise" his work, I will PM you the link for his website and the app in question. So check, your MQL5 Profile Message box.