Errors, bugs, questions - page 2941
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
Can you suggest, if there is, a way to save previous value of string variable in the indicator after Init event? Global variables of the terminal do not work with string. To be exact, at the end of OnCalculate() we need to make prev_val=val and to save prev_val afterInit, while val will take a new value, as usual. But I would not like to create an object on the chart, name it by required name and read the old value after Init. It would be pretty ugly, although it is possible... And the name may be long and objects have a very limited number of names.
you can use resources and units to store and transfer simple structures or even arrays of simple structures between TFs.
To do this, you will need:
To store strings, you'll have to use a static uchar array of fixed size. (see CharArrayToString, StringToCharArray).you can use resources and units to store and pass simple structures or even arrays of simple structures between TFs.
For this you will need:
To store strings you'll have to use a static uchar array of a fixed size. (see CharArrayToString, StringToCharArray).I also remembered - via files, but I wouldn't want to do that either, as it's not the most natural way to do it.
Thanks, I'll give it a try.
I also remembered using files, but I don't want to do that either, as it's not the most natural way to do it.
Thanks, I'll give it a try.
I also remembered using files, but I don't want to do that either, as it's not the most natural way to do it.
Thanks, I'll give it a try.
If we're talking about MT5, there is a non-zero probability that OnInit of the new indicator state will be called before OnDeinit of the previous indicator state
Therefore, data saving should not take place at OnDeinit, but immediately after a data change or at some event.
Is there a function or some other additional functionality (library, code) for saving EA settings?
When you run the EA, save the settings to the standard settings grid.
Is there a function or some other additional functionality (library, code) for saving EA settings?
When you run an EA, save the settings to the standard settings grid.
Here is an example in the description. Search for SaveSet.
The application has been "Started" in the Service Desk since December.
Probably got lost