codeidea:
I believe that when you call indicator from expert it will be calculated independently from any indicator on the chart right at the moment of call. So, you'll get data which is accurate for the moment of your call.
If I call an indicator form an expect, the event OnTick of the expert and OnCalculate of the indicator , which be execute first?
thanks
hongbin.fei
How to call indicators in MQL5
- 2010.03.12
- KlimMalgin
- www.mql5.com
With new version of MQL programming language available not only the approach of dealing with indicators have changed, but there are also new ways of how to create indicators. Furthermore, you have additional flexibility working with indicator's buffers - now you can specify the desired direction of indexing and get exactly as many indicator's values as you want. This article explains the basic methods of calling indicators and retrieving data from the indicator's buffers.
hasayama:
I believe that when you call indicator from expert it will be calculated independently from any indicator on the chart right at the moment of call. So, you'll get data which is accurate for the moment of your call.
my indicator draws object only , not use buffer not all, so I must need know who is first be executed.
I believe that when you call indicator from expert it will be calculated independently from any indicator on the chart right at the moment of call. So, you'll get data which is accurate for the moment of your call.
Rosh:
I use pring(TimeCurrent), they always same value printed
Put function Print in both program and see log.
TimeCurrent() returns last known server time. TimeLocal() is useless too.
Second. Which print is first? From what program?
codeidea:
I use pring(TimeCurrent), they always same value printed
Add something into output that helps you to understand which line was printed by indicator and which line was printed by EA.I use pring(TimeCurrent), they always same value printed
I tried to test with print messages, it looks like Indicator is first to be called. And I believe it is the right way to handle this, indicators information always should be up to date.
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
If I call an indicator form an expect, the event OnTick of the expert and OnCalculate of the indicator , which be execute first?
thanks
hongbin.fei