Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

MOC whiplash - Street smarts for Amibroker (AFL)
ashok22
almost 7 years ago
Amibroker (AFL)

Rating:
3 / 5 (Votes 2)
Tags:
amibroker, exploration

Street smarts MOC whiplash

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("www.disciplined.trade");
//smart_street_linda_raschke_MOC Created by www.disciplined.trade
//We are looking for days when a gap in the morning is followed by a
//reversal in the afternoon. This reversal tends to follow-through the next morning AND
//often for the next few days.

SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
Cond1 = Open <Ref(Low,-1);
dh = Ref(High,-1)-Ref(Low,-1);
Cond2 = C>O AND C>dh;
MOC = Cond1 AND Cond2;
Buy = MOC;
AddColumn(Close,"close",1.2);
AddColumn(Volume,"volume");
AddColumn(MOC,"MOC");
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
_SECTION_END();

3 comments

1. shiree

Concept is good but code seems wrong.

Tried to alter .

_SECTION_BEGIN("Morning Gap fade_modified_MOC whiplash - Street smarts");//MOC whiplash - Street smarts
//smart_street_linda_raschke_MOC Created by www.disciplined.trade
//We are looking for days when a gap in the morning is followed by a
//reversal in the afternoon. This reversal tends to follow-through the next morning AND
//often for the next few days.
 
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
/*Cond1 = Open <Ref(Low,-1);
dh = Ref(High,-1)-Ref(Low,-1);
Cond2 = C>O AND C>dh;
MOC = Cond1 AND Cond2;  */

R1 = Ref(H,-1)-Ref(L,-1);

Cond00 = IIf(Ref(O,-1) <Ref(C,-1),Ref(O,-1) ,Ref(C,-1) );
Cond0 = Open <Cond00;

//Cond1 = Open <Ref(C,-1);
Cond2 = C>O AND C>Ref(L,-1)+R1/2;
Cond3 = C>O AND C>Ref(H,-1);

Buy1=Cond0  AND Cond2;
Buy2=Cond0  AND Cond3;

//Buy = MOC;

/*Filter=Buy1 OR Buy2;
     
AddColumn(Close,"close",1.2);
AddColumn(Volume,"volume");
AddColumn(Buy1,"MED");
AddColumn(Buy2,"STRONG");    */

PlotShapes(IIf(Buy1, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy1, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy1, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);

PlotShapes(IIf(Buy2, shapeSquare, shapeNone),colorYellow, 0, L, Offset=-70);
PlotShapes(IIf(Buy2, shapeSquare, shapeNone),colorYellow, 0,L, Offset=-80);                      
PlotShapes(IIf(Buy2, shapeUpArrow, shapeNone),colorBlack, 0,L, Offset=-75); 

 //////////////////////////////////// SELL SIGNAL//////////////////////////////////
 
 R1 = Ref(H,-1)-Ref(L,-1);

Cond00 = IIf(Ref(O,-1) >Ref(C,-1),Ref(O,-1) ,Ref(C,-1) );
Cond0 = Open >Cond00;

Cond2 = C<O AND C<Ref(L,-1)+R1/2;
Cond3 = C<O AND C<Cond0;

Sell1=Cond0  AND Cond2;
Sell2=Cond0  AND Cond3;

//Buy = MOC;

Filter=Buy1 OR Buy2 OR Sell1 OR Sell1;
     
AddColumn(Close,"close",1.2);
AddColumn(Volume,"volume");
AddColumn(Buy1,"Buy_MED");
AddColumn(Buy2,"Buy_STRONG");

AddColumn(Sell1,"Sell_MED");
AddColumn(Sell2,"Sell_STRONG");

PlotShapes(IIf(Sell1, shapeSquare, shapeNone),colorDarkRed, 0, H, Offset=40);
PlotShapes(IIf(Sell1, shapeSquare, shapeNone),colorDarkRed, 0,H, Offset=50);                      
PlotShapes(IIf(Sell1, shapeDOWNArrow, shapeNone),colorWhite, 0,H, Offset=-45);


PlotShapes(IIf(Sell2, shapeSquare, shapeNone),colorCustom12, 0, H, Offset=70);
PlotShapes(IIf(Sell2, shapeSquare, shapeNone),colorCustom12, 0,H, Offset=80);                      
PlotShapes(IIf(Sell2, shapeDOWNArrow, shapeNone),colorWhite, 0,H, Offset=-75); 
_SECTION_END();
2. parfumeur

May I humbly suggest you place this revision in the Pastie section, so the afl formating is kept intact, with a link here…

3. likone

Useless code

dh = Ref(High,-1)-Ref(Low,-1);
Cond2 = C>O AND C>dh;

Naturally c<dh cannot be happen

Leave Comment

Please login here to leave a comment.

Back