Values chaining when zooming in chart. (Multi Timeframe functions used)

I made a simple crossover strategy using EMA20 and EMA200. I wanted to plot the 15 minute version of the chart on 1 min chart.(NOTE: Doing it for practicing) so I did it using AFL's built in timeframe functions.

The issue I am facing: I noticed that when I zoomed in the chart My EMA200 value is changing. (NOTE: I also made sure that my candle selected was not going out of the screen. and I also made sure that I was on the same candle ).

My Code:


ema20 = EMA(Close,20);
ema200 = EMA(Close,200);

a = Cross(EMA(Close,20),EMA(C,200));
b = Cross(EMA(Close,200),EMA(C,20));



Buy = TimeFrameExpand(a,in15Minute);
Sell = TimeFrameExpand(b,in15Minute);

Screen shots to prove where it happened:


@KirtiKher, using your code I'm unable to reproduce the problem. For testing I use the vertical quote marker as a reference, making sure it always remains visible when zooming.

1 Like

I already made sure that my vertical quote marker did not go out of the screen while taking this screenshot.

Could it be my data's fault?