i wrote an indicator that works on each tick calculation and creates plots for some given candles. It works perfectly. Let's call it indicator 1.
I want to use the plots of this indicator in another indicator. ( indicator 2 ). Indicator 2 also works on each tick calculation. It should plot a horizontal line if indicator1.plot[1] > 0, at indicator 1 plot value.
The problem is that it only works in historical state. And, even so, it does not read the plots of indicator 1, but it places the horizontal lines where they should be.
Code of indicator 2 :
Print( indicatpr1.plot[1]);
if ( indicator1.plot[1] > 0 )
{
DrawLine;
}
On realtime, the plots from indicator1 are also read as 0, but no lines are plotted.
What could be the reason?

Comment