function run()
{
set(PLOTNOW, TICKS);
PlotScale = 8;
StartDate = 20160101;
EndDate = 20160331;
BarPeriod = 60;
LookBack = 3;
vars Price = series(price());
vars Highs = series(priceHigh());
vars Lows = series(priceLow());
var fHigh = FractalHigh(Highs, 3); // short term highs and lows
var fLow = FractalLow(Lows, 3);
static vars fLowCurrent = series(), fHighCurrent = series(); // fractal values are retained between runs ...
if(fHigh != 0){
fHighCurrent[0] = fHigh;
plot("Recent High", fHighCurrent[0], MAIN|DOT, BLUE);
printf(" fHighCurrent[0] = %.5f, fHighCurrent[1] = %.5f \n ", fHighCurrent[0], fHighCurrent[1]);
}
if(fLow !=0){
fLowCurrent[0] = fLow;
plot("Recent Low", fLowCurrent[0], MAIN|DOT, RED);
printf(" fLowCurrent[0] = %.5f, fLowCurrent[1] = %.5f \n ", fLowCurrent[0], fLowCurrent[1]);
}
}