Skip to content

Instantly share code, notes, and snippets.

@DTM-SC
Last active January 4, 2020 05:00
Show Gist options
  • Save DTM-SC/06e2253649afcf0006fc31e392af64de to your computer and use it in GitHub Desktop.
Save DTM-SC/06e2253649afcf0006fc31e392af64de to your computer and use it in GitHub Desktop.
// This PSAr AFL is developed by DTM - www.Dailytrademantra.com
ThisColor = IIf( C>O, Colorgreen, IIf(C<O, Colorred, colorBlack));
PlotOHLC( O, H, L, C, "", ThisColor, styleCandle|styleNoLabel,0,-5,0);
_N(Title = StrFormat("{{NAME}} " + EncodeColor(colorBrightGreen) + " {{DATE}} " + EncodeColor(colorYellow) +" Open: %g " + EncodeColor(colorLime) +" High: %g " + EncodeColor(colorOrange) +" Low: %g "+ EncodeColor(colorYellow) + " Close: %g {{VALUES}} ", O, H, L, C));
_SECTION_BEGIN("PSAR Plot");
accel_f = Param("Acc Factor", 0.02, 0, 1, 0.01);
Max_ = Param("Max. acceleration", 0.2, 0, 1, 0.1);
P_SAR = SAR(accel_f,Max_);
dotscolor = IIf(P_SAR < L,colorGreen,IIf(P_SAR> H,colorRed,colorWhite));
Plot(P_SAR,"",dotscolor,styleDots|styleNoLine);
_SECTION_END();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment