PT_Scalper
Member
Hello,
Can someone assist with turning this study into a MTF?
Thanks you in advance.
Can someone assist with turning this study into a MTF?
#addlabel(yes," Buy Program ",createcolor(82,202,22));
#addlabel(yes," Sell Program ",color.red);
#addlabel(yes," Capper ", color.white);
def sDev = StDev(data = close, 20);
def mid = MovingAverage(AverageType.SIMPLE, close, 20);
def lowerBand = mid -1 * sDev;
def upperBand = mid - (-1.918) * sDev;
def range = AbsValue(open - close);
def WAvg = WildersAverage(range, 20);
def avgVolume = ExpAverage(volume,50);
def bp= (close - low)/(high - low) > 0.75;
def sp = (high - close)/(high - low) > 0.75;
def up = close > open and range > Wavg and volume > avgVolume and bp;
def dn = close < open and range > wavg and volume > avgVolume and sp;
#assignpricecolor(if up then color.green else if dn then color.red else color.current);
plot hiupvol = if up and !up[1] then round(volume/1000,0) else double.nan;
hiupvol.setpaintingstrategy(paintingstrategy.values_below);
hiupvol.setdefaultcolor(color.green);
hiupvol.assignvaluecolor(if low < lowerBand and range > wavg and volume > avgVolume and bp then color.magenta else color.current);
AddLabel(hiupvol, “Hi: ” + round(volume/1000,0), color.green);
plot hidnvol = if dn and !dn[1] then round(volume/1000,0) else double.nan;
hidnvol.setpaintingstrategy(paintingstrategy.values_above);
hidnvol.setdefaultcolor(color.red);
hidnvol.assignvaluecolor(if high > upperBand and range > wavg and volume > avgVolume and sp then color.magenta else color.current);
AddLabel(hidnvol, “Lo: ” + round(volume/1000,0), color.red);
#AssignBackgroundColor (if dn and !dn[1] then Color.red else if up and !up[1] then Color.green else Color.Gray);
Thanks you in advance.