Saturday, April 16, 2016

Widget THINKSCRIPT: PPAHist

#PPAHist (new and fixed) on 4/17/16 for watchlist widget...now is the same as the chart's PriceAsATRtrendHist

input MAlength = 50;
input averageType = AverageType.wilders;

def PPA = sum ((close - close [1]) / (ATR(10, averagetype)),999);


def PPAMA = MovingAverage (averageType, PPA, MAlength);


plot PPAhist = PPA - PPAMA;

PPAhist.SetPaintingStrategy(paintingStrategy = PaintingStrategy.HISTOGRAM);

PPAhist.AssignValueColor(if PPA >= PPAMA then Color.GREEN else Color.RED);

PPAhist.SetLineWeight(3);

No comments:

Post a Comment