jamesh992000: in an MQL4 indicator attached to a chart .… the value varies despite the indicator being attached only in the original window/chart.
You have “an indicator attached to a chart.” You changed the chart, your indicator is now on the changed chart. There is no “original chart.”
William Roeder #:
You have “an indicator attached to a chart.” You changed the chart, your indicator is now on the changed chart. There is no “original chart.”
And yet if my trivial indicator were to have
Print(Bid);
rather than
Print(WindowBarsPerChart());
then even by flicking between the charts of various symbols I would always see the price of the original chart.
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
I am trying to use the result of
in an MQL4 indicator attached to a chart. By using Print() I can view the result in the 'Experts' tab of the terminal window.
As I navigate between other symbols' chart windows I see that the value varies despite the indicator being attached only in the original window/chart.
I see the same behaviour if I expose the values of
and
I created a trivial indicator to attach to a chart to demonstrate the issue.
Is this expected behaviour? Especially in the case of the use of CHART_VISIBLE_BARS where the ChartID() has been explicitly defined.
Thanks,
James