//@LibraryID:1183,0 //@Name:Volume Conviction Bars //@Description:Designed to colour the bars as per the Volume Conviction indicator script. // Care has been taken in preparing this code but it is provided without guarantee. // You are welcome to modify and extend it. Please add your name as a modifier if you distribute it. // Coded by Phil Tolhurst - Support Manager - 31-10-17 var maList = ["Simple","Exponential","Weighted","Triangular","VariableVHF","VariableCMO","VIDYA"]; var maTitleList = ["SMA","EMA","WMA","TMA","VVHF","VCMO","VIDYA"]; var MAtype = 0; var period = 20; var col = [Colour.Black,Colour.Green,Colour.Yellow,Colour.Blue,Colour.Red] var colDesc = ["Default","Close>Prev.High","Close>Prev.Close","ClosemaCalc[i]) { if (bars[i].close>bars[i-1].high) bars[i].colour = col[1]; else if (bars[i].closebars[i-1].close) bars[i].colour = col[2]; else bars[i].colour = col[3]; } else { bars[i].colour = col[0]; } } } }