Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1136
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
No. I explained above what the frost level is.
Thank you Artem, I'll look into it tomorrow.
SL and TP are orders. "Levels" - because these are the levels at which these orders are set. You may also call them indent or distance in pips. This does not make them orders.
I am willing to accept that this is how it works, but what I don't understand is if SL and TP are orders, then why they aren't in the list of orders, for example OrdersTotal() orHistoryOrdersTotal();
Thank you Artem, I'll look into it tomorrow.
I understand that ))))
1) What is the difference between a script and a service?
2) Is it possible to run the indicator on any desired window from the EA without using templates?
1) What is the difference between a script and a service?
2) Is it possible to run the indicator from an EA on any desired window without using templates?
here is the function - from the EA https://www.mql5.com/ru/docs/chart_operations/chartindicatoradd
here is the function - from the advisor https://www.mql5.com/ru/docs/chart_operations/chartindicatoradd
Thank you!
1) What is the difference between a script and a service?
the script is bound to a chart, the service is not
the script is started "manually", the service is started by the terminal
I don't know any other differences, there is no information about services
the script is bound to a chart, the service is not
the script is started "manually", the service is started by the terminal
I don't know any more distinctions, there is no information about the services
Do I get it right? running indicators and advisors after closing the terminal have the properties of the service, but the script does not, i.e. if a script, an indicator and an advisor were running and the terminal was closed, when opening the terminal, only the indicator and the advisor will be loaded to the window, while the script will not?
Do I get it right? Run indicators and advisors after closing the terminal have the properties of the service, but the script does not, i.e. if there were running script, indicator and advisor and the terminal was closed, when you open the terminal, only indicator and advisor will be loaded into the window, but not the script?
no
the most important thing in MQL is "the chart".
all of them - indicators, Expert Advisors and scripts - are bound to the chart
But the service is not bound to anything - it starts with the terminal and has no chart, i.e. it can't check anything as usual... Well, _Symbol, _Digits - nothing at all that we are used to using, this data is all given by chart
It makes no difference for indicators and EA whether to close the chart or the entire terminal, as far as the service is concerned, if you close all charts, it will work until you close the terminal
If you close the EA by closing the chart, then after the restart of the terminal, there will be no miracle - no chart, no EA, and the service always starts when you start the chart
it's like this, on my fingers ))))
yesterday i did an example of the service,https://www.mql5.com/ru/forum/170952/page173#comment_16044829
i don't know yet what to do with them.
ZS: if we are talking about a script, EA and indicator - what is the difference, the indicator can not trade, but it can draw indicator buffers, the script can do the same thing as EA, but it works "once" and unloads, so it does not unload - infinite loop, but still the terminal when you switch TFs will unload the script
I can't explain it any easier, just look through the first chapters, it's all there
Igor Makanu:
but the service is not bound to anything, it starts with the terminal and has no chart, i.e. it can't find out anything as usual... well _Symbol, _Digits - nothing at all that we're used to using, that's all data given by the chart
Who told you that? Using _Symbol or _Digits specifically, can't, but it's easy to get those values. All that is on the chart all you can get from the service. I was not particularly interested in them, but in the light of recent changes I use the service to remove the arrows and lines of closed positions I hate. I start the terminal, run the service and delete all these marks on all charts without touching those created manually or by other programs.