Questions from Beginners MQL4 MT4 MetaTrader 4 - page 238
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
Artyom, thank you, I was waiting for your advice. While waiting, I was looking for possible solutions myself. This morning I figured out how to show the settings window programmatically !
I found that the window is called by pressing F7. A search on the Internet has shown that I can make a soft-key display using MQL.
The rest is a matter of technique. I am pasting the code here to share with you if someone may find it useful:
extern double BuyStop, SellStop;
...
You are welcome. You may wait a long time for my answer/advice :) Others have told you the same thing.
There is no solution for marketplace. And you need PostMessageW()
But I rejoiced too early. I managed to open the parameter window programmatically, but the values I assigned to the parameters in the procedure were not saved (((
That is, when I open the parameter window, I see the values specified during initialization, in my case zeros.
Is there any way to make the calculated values transferred to the parameter form ?
No. Calling parameters with F7 will exit the EA via OnDeInit and start the EA again via OnInit. This is how the EA works in a chart. Crusty doesn't even work. The parameter form only works one way, the intput and extern values are programmatically read there (in 5ka there is no extern, by the way) before the EA is initialised. The second time OnInit is not called during the current EA operation.
The only way to criss-cross is to pull the EA code, make changes there, compile it and call the parameter form) But this is a Sisyphean task))) A panel similar to the form of parameters is more correct...
No. Calling parameters with F7 ends the EA via OnDeInit, and starts the EA again via OnInit. This is how the EA works in the chart. It does not even get crusty. The parameter form only works one way, the intput and extern values are programmatically read there (in 5ka there is no extern, by the way) before the EA is initialised. The second time OnInit is not called during the current EA operation.
The only way to criss-cross is to pull the EA code, make changes there, compile it and call the parameter form) But this is a Sisyphean task))) A panel similar to the form of parameters is more correct...
Thanks, I'll give it a try. I've thought of another variant - to call the form of parameters, then by functions API to write in Edit fields values of parameters.
By the way, how to make when I start an EA, the parameters form should NOT be shown? I call it programmatically, so there is no sense in the first show.
Thanks, I'll try it. I thought of another option - to call the form of parameters, then by API functions to write in Edit fields the values of parameters.
By the way, could you advise how to make the parameter form NOT be shown when starting the EA? I call it programmatically, so there is no sense in the first show.
programmatically generate a template with all the required parameters and then ChartApplyTemplate()
Thanks, I'll try it. I thought of another option - to call the form of parameters, then by API functions to write in Edit fields the values of parameters.
By the way, could you advise how to make the parameter form NOT show up when I start the EA? I call it programmatically, so there is no sense in the first show.
I don't understand the logic why to do so) There is OOP, any EA can be wrapped in a class, and call it from within a class with parameters obtained / calculated as desired. And that's without leaving the scope of the μl.
I don't know how to make a form not to be shown at manual start.
If to crutch further, it is possible to write parameters in parammysov.set and read it. But this is a complex add-on.
programmatically generate a template with all the necessary parameters and then ChartApplyTemplate()
Maxim, brilliant! I did not know that EA settings are saved in a template. This option is the easiest one, so I will do it that way. There is only one problem - it does not show the form of parameters at startup.
But it is not critical, I would just need once more to press ОК.
hello, help me create a simple algorithm where old orders are deleted if new ones are formed...
Guys. MT4 Not working. Shows yesterday's time as 23:59. Same situation online. From phone via mobile internet same situation. What is it?
Guys. MT4 Not working. Shows yesterday's time as 23:59. Same situation online. From phone via mobile internet same situation. What's that?
I can guess it's a day off.