//@version=5 indicator('Heiken Ashi MTF') ha_t = ticker.heikinashi(syminfo.tickerid) res1 = input.timeframe('15S', title='Timeframe 1') res2 = input.timeframe('30S', title='Timeframe 2') res3 = input.timeframe('1' , title='Timeframe 3') res4 = input.timeframe('2' , title='Timeframe 4') res5 = input.timeframe('3' , title='Timeframe 5') res6 = input.timeframe('4' , title='Timeframe 6') res7 = input.timeframe('5' , title='Timeframe 7') res8 = input.timeframe('6' , title='Timeframe 8') res9 = input.timeframe('7' , title='Timeframe 9') ha_col()=> r = close>open? 1 : -1 r ha_side1 = request.security(ha_t, res1, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side2 = request.security(ha_t, res2, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side3 = request.security(ha_t, res3, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side4 = request.security(ha_t, res4, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side5 = request.security(ha_t, res5, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side6 = request.security(ha_t, res6, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side7 = request.security(ha_t, res7, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side8 = request.security(ha_t, res8, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) ha_side9 = request.security(ha_t, res9, ha_col(), barmerge.gaps_off, barmerge.lookahead_on) plot(1, title='TF 1', color=ha_side1 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(2, title='TF 2', color=ha_side2 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(3, title='TF 3', color=ha_side3 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(4, title='TF 4', color=ha_side4 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(5, title='TF 5', color=ha_side5 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(6, title='TF 6', color=ha_side6 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(7, title='TF 7', color=ha_side7 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(8, title='TF 8', color=ha_side8 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) plot(9, title='TF 9', color=ha_side9 == 1 ? color.green : color.red, style=plot.style_circles, linewidth=4) long = ha_side1==1 and ha_side2==1 and ha_side3==1 and ha_side4==1 and ha_side5==1 and ha_side6==1 and ha_side7==1 and ha_side8==1 and ha_side9==1 short = ha_side1==-1 and ha_side2==-1 and ha_side3==-1 and ha_side4==-1 and ha_side5==-1 and ha_side6==-1 and ha_side7==-1 and ha_side8==-1 and ha_side9==-1 side = 0.0 side:= long? 1 : short? -1 : side[1] bgcolor(long and not long[1]?color.new(color.green , 20):short and not short[1]? color.new(color.red , 20):na) barcolor(long?color.new(color.green , 20):short? color.new(color.red , 20):na)