Without interrupting your found path, but I would like to know, isn't it also possible to add such a configuration file using the #resource compiler directive?
Wouldn't that be like reading a file with a function, but with a different source path?
Without interrupting your found path, but I would like to know, isn't it also possible to add such a configuration file using the #resource compiler directive?
Wouldn't that be like reading a file with a function, but with a different source path?
Perhaps , if it were broken down into parallel simple structures that are assembled on init . (i assume you mean the following)
#resource "data.bin"asint ExtData[] // declare the numeric array containing data from the data.bin file#resource "data.bin"asMqlRates ExtData[] // declare the simple structures array containing data from the data.bin file
Lorentzos Roussos #: Perhaps , if it were broken down into parallel simple structures that are assembled on init . (i assume you mean the following)
Actually, Dominik Christian Egert is correct and I had forgotten that you can also import a file as a data resource instead of having to use BMP files.
I'm still of the opinion that the #include file of global variable declarations would be more efficient, but the data resource method may be more practical.
It may depend on how you are supplying this data to the normal users you have bought a valid license instead of the demo tester users, in order to make a similar process for both types of licenses.
Indeed @Dominik Christian Egert 's solution is optimal because when these structures are used , they wont be altered and , the size is known . Assuming i provide a header bin which directs the loading process. (and is overridden if the user specifies a different input)
I failed spectacularly with trying to read\write to a uchar array yesterday , might have been the tanquerray.
The best solution is the include for MT4 and the resource bin for MT5
The bitmap does not work for MT4 , even in ARGB_RAW (verbatum "the terminal does not mess with the color components") it is messing with the color components.
That or there is an error on my part . Noticed every 4th byte is correct the rest seem to have been Anti-Aliased by the terminal.
(so the non bmp parts are usable)
Cheers
(its one copy and paste to be applicable on MT5 too , for moderators)
Lorentzos Roussos #: The best solution is the include for MT4 and the resource bin for MT5. The bitmap does not work for MT4 , even in ARGB_RAW (verbatum "the terminal does not mess with the color components") it is messing with the color components. That or there is an error on my part . Noticed every 4th byte is correct the rest seem to have been Anti-Aliased by the terminal. (so the non bmp parts are usable)
Cheers. (its one copy and paste to be applicable on MT5 too , for moderators)
Unfortunately I have little experience with using BMP resources, so I can't help here.
Which ever solution you decide on, it may be best to use the same one for both MQL4 and MQL5 (assuming you are using a single source file for both), so that you have less code differences to maintain and worry about.
Unfortunately I have little experience with using BMP resources, so I can't help here.
Which ever solution you decide on, it may be best to use the same one for both MQL4 and MQL5 (assuming you are using a single source file for both), so that you have less code differences to maintain and worry about.
Yes , although its fun utilizing the full extent of MT5's capabilities .
Anyway , i was wrong , if you set the alpha channel at 0 and utilize 3 bytes per pixel for data there is no AA and that method just has a 25% increase in size vs the 7 times increase of the include.
Thank you Fernando , i will upload the solution cleaned up later or tommorrow .
Perhaps , if it were broken down into parallel simple structures that are assembled on init . (i assume you mean the following)
Actually, Dominik Christian Egert is correct and I had forgotten that you can also import a file as a data resource instead of having to use BMP files.
I'm still of the opinion that the #include file of global variable declarations would be more efficient, but the data resource method may be more practical.
It may depend on how you are supplying this data to the normal users you have bought a valid license instead of the demo tester users, in order to make a similar process for both types of licenses.
Also remember that you can map the simply structure array data into a more complex structure by using "union".
Indeed @Dominik Christian Egert 's solution is optimal because when these structures are used , they wont be altered and , the size is known . Assuming i provide a header bin which directs the loading process. (and is overridden if the user specifies a different input)
I failed spectacularly with trying to read\write to a uchar array yesterday , might have been the tanquerray.
(the include bs.mqh was a previous output with save as code)
the result was :
That solution fits . Thank you @Dominik Christian Egert
Thank you too Fernando (your name is not taggable)
This is the simplest modification for the previous code , although , i will seek to find what i missed with float and double types
The best solution is the include for MT4 and the resource bin for MT5
The bitmap does not work for MT4 , even in ARGB_RAW (verbatum "the terminal does not mess with the color components") it is messing with the color components.
That or there is an error on my part . Noticed every 4th byte is correct the rest seem to have been Anti-Aliased by the terminal.
(so the non bmp parts are usable)
Cheers
(its one copy and paste to be applicable on MT5 too , for moderators)
Cheers. (its one copy and paste to be applicable on MT5 too , for moderators)
Unfortunately I have little experience with using BMP resources, so I can't help here.
Which ever solution you decide on, it may be best to use the same one for both MQL4 and MQL5 (assuming you are using a single source file for both), so that you have less code differences to maintain and worry about.
Unfortunately I have little experience with using BMP resources, so I can't help here.
Which ever solution you decide on, it may be best to use the same one for both MQL4 and MQL5 (assuming you are using a single source file for both), so that you have less code differences to maintain and worry about.
Yes , although its fun utilizing the full extent of MT5's capabilities .
Anyway , i was wrong , if you set the alpha channel at 0 and utilize 3 bytes per pixel for data there is no AA and that method just has a 25% increase in size vs the 7 times increase of the include.
Thank you Fernando , i will upload the solution cleaned up later or tommorrow .
Cheers