Questions from Beginners MQL5 MT5 MetaTrader 5 - page 330
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 someone tell me how to use EAs?
Guys! When we change the timeframe, the EA is restarted. As a result, it returns all of its drawn chart to its default appearance. How can I disable the restart when I change the timeframe?
Would it be better to correct a nuance in the Expert Advisor, so that the chart drawn by it is displayed correctly after the change of the TF?
Guys! When you change timeframe, the Expert Advisor is restarted. As a result, it returns all its drawn chart to the default view. How can I disable the restart when I change the timeframe?
You can't prohibit it. And is it necessary to save the chart? After all, for each timeframe of the chart, all of the constructions can vary dramatically.Take the MACD indicator on different timeframes of the chart as an example.And if the chart plotting is necessary, you need to change the logic of the Expert Advisor.
The Expert Advisor and the indicator must be restarted after the change of the chart period - this is the logic of the function OnInit() - handler of the Init event:
Init
Immediately after the client terminal loads a program (Expert Advisor or custom indicator) and starts the initialization of global variables, an Init event will be sent, which is handled by the OnInit() function, if it has one. This event is also generated after a security and/or chart period change, after recompiling the program in MetaEditor, after a change of input parameters from an Expert Advisor or a custom indicator setting window. The Expert Advisor is also initialized after the account is changed. The Init event is not generated for scripts.
You can't prohibit it. And is it necessary to save the chart? After all, for each timeframe of the chart, all of the constructions can vary dramatically.Take the MACD indicator on different timeframes of the chart as an example.And if the chart plotting is necessary, you need to change the logic of the Expert Advisor.
The Expert Advisor and the indicator must be restarted after the change of the chart period - this is the logic of the function OnInit () - handler of the Init event:
I don't quite agree. Of course, it is necessary to restart, but for the sake of resource saving, just for multitemporal indicators/advisors with a large number of graphical objects - you can bypass some parts of initialization, in particular, recalculation of already built. I.e. if by logic (which I personally think is correct) after deinitialization the graphical constructions are deleted, then the reason of TF change should be processed (without deleting constructions). If you want, it is better to adjust visibility of objects by TF without rebuilding of objects themselves.
Can you tell me how to find the minimum value of variable with type double from iCustom buffers, there are 8 of them.
I think it is solved by the array, but how to write it I do not know.
Help plz!
Hello to all, both freeloaders and professionals, I have no time to re-read all the memoirs of the forum, quietly by the principle of parkour we learn MQ.............
Vobsobschestvya current problem: I downloaded the panel from the example, adapted it in my EA, now the task is to enable and disable this panel in the settings
so in the code
I write in variables :
input bool vkl =false;//delete panel
I explain further
if //
DeleteInfoPanel();
if (vkl=false);
----------------
then an error or something else he doesn't understand me))
If you know how to do it correctly by example, or show me where to find a file with an example
Can you tell me how to find the minimum value of variable with type double from iCustom buffers, there are 8 of them.
I think it is solved by the array, but how to write it I do not know.
Help plz!
...
In order to delete something, it has to be created first.
And one more thing: when you change EA properties (in input parameters you have set condition true - you want to delete the EA), this condition will not let you delete the panel:
This condition will only work if you delete the Expert Advisor from the chart.