Contribute

Contribute an indicator to the library by clicking here. Note you must be logged in.

New! Stock Portfolio Organizer is now available:
  • Shares, Margin, Futures and Forex
  • EOD and Realtime data
  • And Much More...
GoTo Stock Portfolio Organizer
New! WiseTrader Toolbox for Amibroker is now available with:
  • Advanced Adaptive Indicators
  • Advanced Pattern Exploration
  • Neural Networks
  • And Much More...
GoTo WiseTrader Toolbox

Popular Indicators

MOC whiplash - Street smarts for Amibroker (AFL)

3 / 5 (Votes 2)

Street smarts MOC whiplash

Similar Formulas

Formula

2 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();

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

Please login here to leave a comment.

Main Menu

Indicators

Sponsors