Good day to all!
There was a problem. The indicator, if it is opened in a separate window (indicator_separate_window), is not updated until the next candle occurs. If the indicator is hung on the chart window, then the update (calculation) is correct in real time, i.e. the price has changed – the indicator value has changed immediately.
What could be the catch in the case of a separate window? A normal calculation in real time is absolutely necessary.
Maybe there is some “operator” responsible for this?
Unfortunately, I can’t upload the code here.
starleynsk
Thanks. The error was corrected by our own efforts. I really don’t know how 🙂
scriptong
If the versions differ only in the Directive, then the problem is the” empty ” values of the indicator buffers. How are they (“empty” values) specified in the code, and are they specified at all? In any case, you need to explicitly specify.
vitales
There are no such settings. From your words, I understand that you have two versions of the same indicator. One version is compiled with the indicator_separate_window Directive, the other without (indicator_chart_window). See how they differ from each other in addition to this Directive. I can’t say anything else.
starleynsk
Why immediately so? Perhaps there are some specific “operators” or commands that are standard for any constructions and are responsible for real-time calculation. Or some settings in the MT5 itself.