There are two ways to do that.
First, modify each indicator that should react on this line.
Second, make additional indicator for each, like sort of mask. That mask will copy data of original indicator and show data only before the line.
to get line time use ObjectGetInteger(0,"line_name",OBJPROP_TIME,0)
if you need to monitoring line position, use OnChartEvent Function.
if you go by second way and make indicator mask, use iCustom function.
to get line time use ObjectGetInteger(0,"line_name",OBJPROP_TIME,0)
if you need to monitoring line position, use OnChartEvent Function.
if you go by second way and make indicator mask, use iCustom function.
First way much easier, but its required original source of indicator (mq4 or mq5 file).
Indicators have main function OnCalculate and construction inside like this:
for(i=0; i<limit; i++) or for(int i=start; i<rates_total && !IsStopped(); i++)
this is cycle for calculate each bar value of the line.
modify it by replacing border values for bar index with line.
To get bar index by time easily, use iBarShift function.
Your topic has been moved to the section: Technical Indicators
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 would like to hide all indicators data on the chart after the date of a vertical line drawn (named "RANGE_END"). For example in the following diagrams, left chart is before the vertical line is drawn, right chart is when the vertical line is added, I would like to hide all the data after the line (the zigzag is my own EA, I have written logic to hide, but I want to know how to hide the multiple moving averages indicator).