Update: As you can see last channel is anchored wrong and I dont know how to edit that picture:) So here is the corrected one
https://www.tradingview.com/e/PMhbcHQY/
Middle Line : Traditional MIDAS line calculated with hl2
Lower Line: MIDAS line calculated with low values
Upper Line: MIDAS line calculated with high values
https://www.tradingview.com/e/PMhbcHQY/
Middle Line : Traditional MIDAS line calculated with hl2
Lower Line: MIDAS line calculated with low values
Upper Line: MIDAS line calculated with high values
// Akif TOKUZ // akifusenet@gmail.com // MIDAS Channel study("Midas Channel", overlay=true) startBar=input(title="Starting Bar Number",minval=1,maxval=100000,defval=20) start = (n==startBar-1) v = na(volume) ? 1 : volume cumV = cum(v) CumPV = cum(hl2*v) SupportCumPV = cum(low*v) ResistanceCumPV = cum(high*v) startV = valuewhen(start,cumV,0) StartPV = valuewhen(start,CumPV,0) SupportStartPV = valuewhen(start,SupportCumPV,0) ResistanceStartPV = valuewhen(start,ResistanceCumPV,0) Midas = (CumPV-StartPV)/(cumV-startV) SupportMidas = (SupportCumPV-SupportStartPV)/(cumV-startV) ResistanceMidas = (ResistanceCumPV-ResistanceStartPV)/(cumV-startV) middle = plot(Midas, color=aqua,linewidth=2) lower = plot(SupportMidas, color=blue,linewidth=1) upper = plot(ResistanceMidas, color=red,linewidth=1) fill(lower,upper,color=#1c86ee,transp=80)