i´m trying to plot a fill between two moving averages in a 2 minutes chart to identify a trend of the chart, the first one is a 5 minutes time frame 50 periods length MA and the second one is a 2 minutes time frame 2 periods length MA.
When i try to add a fill betwwen the two plots, i have two options to plot the fill: 1.-Changing the chart time frame to 5 minutes to match with the highest time frame of the 50 periods MA, doing this i can see the fill correctly but i need stay in the 2 minutes chart time frame and 2.- Diasble the GAP option from the indicator config from the whole chart staying in the 2 minutes chart but the plots just become "not smoothed", so whats the propper way to stay in a 2 minutes chart and plot correctly the fill between the 2 MAs?
Here is my code
`
//@version=5
indicator("MA Fill", shorttitle="MA Fill", overlay=true, timeframe="", timeframe_gaps=false)
i2 = request.security(syminfo.tickerid, "5", ta.sma(close, 50))
ma2 = plot(i2, color = #ff9800)
ema2 = ta.sma(close, 2)
ema2plot = plot(ema2, color=color.new(color.black,100), style=plot.style_line, linewidth=1, title="EMA(2)", editable = false)
fill(ema2plot, ma2, color = ema2 > i2 ? color.new(#99ff0b, 85) : ema2 < i2 ? color.new(#ff3021, 85) : na, title = "Trend Fill")
` If i leave the Gaps option enabled, i don´t have the fill
If i uncheck the Gaps option i now have the fill but the wave looks "coarse and sharp"
Thank in advance.
I'm trying all above without success