Collection and Disposal - AFL for Amibroker
AdjBar = Param("Bar",0,0,BarCount,1);
AdjZ = Param("Zig",3.1,0,20,.1);
CO = Ref(O,-AdjBar);
CH = Ref(H,-AdjBar);
CL = Ref(L,-AdjBar);
CC = Ref(C,-AdjBar);
"Ticker " + TN = Name() ; // Show Ticker
"Index " + BI = GetBaseIndex(); //BI = BaseIndex String
FO = Ref(Foreign( BI,"O"),-AdjBar);
FH = Ref(Foreign( BI,"H"),-AdjBar);
FL = Ref(Foreign( BI,"L"),-AdjBar);
FC = Ref(Foreign( BI,"C"),-AdjBar);
ZAC = Zig( CC, AdjZ );
UTrend = ZAC > Ref(ZAC, -1);
DTrend = ZAC < Ref(ZAC, -1);
t1 = OscP( 3, 6 );
Cond1a= Cross (t1,MACD());
Cond1b= MACD()>-1 AND MACD()<0;
Cond1= Cond1a AND Cond1b;
Cond2 = MACD()>Signal()-.5;
Cond3 = Cross(0,t1);
C1 = Ref(Cond1,-AdjBar);
C2 = Ref(Cond2,-AdjBar);
C3 = Ref(Cond3,-AdjBar);
ZColor = IIf(UTrend, colorAqua, colorCustom12);
Plot( ZAC, " ", ZColor, styleArea);
Buy = UTrend;
Sell= DTrend;
PlotShapes( shapeDownArrow * Sell, colorRed );
PlotShapes( shapeUpArrow * Buy, colorGreen );
_SECTION_BEGIN("exploration");
No comments:
Post a Comment
Thanks