can anyone explain/amplify this afl n the codes used in it? what is T, BHSDA, etc

#1
_SECTION_BEGIN("DND BuySell System");
//-------------------------------------------------------------------------
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(" Open %g, Hi %g, Lo %g, Close %g (%.1f%%)", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
T=23;
BHSda=((C-MA(C,T))/MA(C,T))*100;
Graph0=BHSda;
Graph0Style=2+4;
Graph0BarColor=IIf(BHSda>0,5,4);
GraphXSpace=5;

SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | styleCandle );
Plot( O, "Open", ParamColor("Color", colorBlack ), styleNoDraw);
Plot( H, "High", ParamColor("Color", colorBlack ), styleNoDraw);
Plot( L, "Low", ParamColor("Color", colorBlack ),styleNoDraw);


//------------------------------------------------------------------------------
Value1 = 60;
Value2 = 40;
BHSMPPer= 13;
BHEXPerc = 2 * BHSMPPer- 1;

BSAU = EMA(Max( C - Ref (C, -1 ),0) , BHEXPerc );
BSAC = EMA(Max( Ref( C, -1 ) - C,0), BHEXPerc );
x1=(BHSMPPer-1)* ((BSAC * Value1 )/(100-Value1) - BSAU);
BSR1 = IIf( x1 >= 0, C + x1, C + x1 * (100-Value1)/Value1 );
x2=(BHSMPPer-1)* ((BSAC * Value1 )/(100-Value2) - BSAU);
BSR2 = IIf( x2 >= 0, C + x2, C + x2 * (100-Value2)/Value2 );

Plot( BSR1, "", colorOrange,styleDashed);
Plot( BSR2, "", colorPaleBlue,styleDashed );

//------------------------------------------------------------------------------


r1 = 12;
r2 = 26;
r3 = 9;
Z = 1;


Cond1 = Cross(MACD(r1,r2),Signal(r1,r2,r3));
Cond3 = Zig(C,z)>Ref(Zig(C,z),-4);
Buy = Cond1 AND Cond3;

Cond4 = Cross(Signal(r1,r2,r3),MACD(r1,r2));
Cond6 = Zig(C,z)<Ref(Zig(C,z),-4);
Sell = Cond4 AND Cond6;

Trigger = WriteIf(Buy, "Buy", "") + WriteIf(Sell, "Sell", "");
BSG = IIf(Buy, colorPaleGreen, IIf(Sell, colorRose, colorDefault));
BSFG = IIf(Buy, colorDarkGreen, IIf(Sell, colorDarkRed, colorDefault));


//------------------------------------------------------------------------------------------------

if((Status("action") == actionExplore) OR (Status("action") == actionScan))
Filter = Buy OR Sell;
SetOption("NoDefaultColumns", True);
AddTextColumn(Name(), "Symbol", 77, BSFG, BSG, 120);
AddColumn(DateTime(), "Date", formatDateTime, BSFG, BSG, 100);
AddColumn(TimeNum() ,"Time",1,BSFG, BSG, 100);
AddColumn( Buy, "Buy", 1,BSFG, BSG, 50);
AddColumn( Sell, "Sell", 1,BSFG, BSG, 50 );
AddColumn( O, "Open", 1.2,BSFG, BSG, 100 );
AddColumn( H, "High", 1.2,BSFG, BSG, 100 );
AddColumn( L, "Low", 1.2,BSFG, BSG, 100 );
AddColumn( C, "Close", 1.2,BSFG, BSG, 100 );
AddColumn(Ref(V,-1),"P-Vol",1,BSFG, BSG, 100);
AddColumn(V/(Ref(V,-1)*100),"Increase in Vol",1,BSFG, BSG, 100);

shape= (Buy * shapeHollowUpTriangle )+(Sell *shapeHollowDownTriangle);
PlotShapes( shape, IIf( Buy, colorBlue, colorBlue ), 0, IIf( Buy, Low, High ) );
GraphXSpace = 7;

//---------------------------------------------------------------------------------------------------------
C13=20;//Param("fonts",20,10,30,1 );
C14=2.1;//Param("left-right",2.1,1.0,5.0,0.1 );
C15=12;//Param("up-down",12,1,20,1 );
Miny = Status("axisminy");
Maxy = Status("axismaxy");
lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");
pxwidth = Status("pxwidth");
pxheight = Status("pxheight");
GfxSetBkMode(transparent=1);
GfxSetOverlayMode(1);
GfxSelectFont("Tahoma", Status("pxheight")/C13 );
GfxSetTextAlign( 6 );
GfxSetTextColor( ColorRGB (217,217,213));
GfxTextOut( Name(), Status("pxwidth")/C14, Status("pxheight")/C15 );
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.4 );
GfxSetTextColor( ColorRGB (103,103,103));
GfxSelectFont("Tahoma", Status("pxheight")/C13*0.45 );
GfxSetTextColor( colorWhite);
GfxSelectFont("MS Sans Serif", 10, 500, False, False, 0);
//------------------------------------------------------------------------------------------------


SetChartBkGradientFill( ParamColor("BgTop", colorDarkOliveGreen),ParamColor("BgBottom", colorDarkGrey));
pShowtradeLines = ParamToggle("Show Trade Lines", "No|Yes", 1);
Volmin=5000;
Volmax=1000000;
priceRL=150;
priceRH=3000;
BSPeChMi=-25;
BSPeChMa=25;
BSPerTkProf=0.6;
BSPerStLos=0.25;


Bars = 0;
xpdh = 90;

{
BSPl_Rng = (TimeNum() >= 90000 AND TimeNum()<= 235500) AND (DateNum()==LastValue(DateNum()));
BSFH_Rg = (TimeNum() >= 090000 AND TimeNum()<= 093000) AND (DateNum()==LastValue(DateNum()));

BSFH_Prc = High * BSFH_Rg;
BSFH_Mrk = BarsSince(BSFH_Rg>0);
Num_Bars = 36000 / Interval(1);

TimeFrameSet(inDaily);
TOP_ = Open;
PDH_ = Ref(High,-1);
PDL_ = Ref(Low,-1);
PDO_ = Ref(Open,-1);
PDC_ = Ref(Close,-1);
PDM_ = (PDH_+PDL_)/2;
TimeFrameRestore();

isAll = True;
isRth = TimeNum() >= 085400 AND TimeNum() <= 093000;
isdRth = TimeNum() >= 085400 AND TimeNum() <= 160000;
 

Similar threads