Amibroker AFL code for RSI Double-Bottom

MarketSecrets - Learn To Trade Like a Pro

Amibroker AFL code for RSI Double-Bottom:

Script:

//——————————————————————————
// Formula Name: RSI Double-Bottom
// Author: www.marketsecrets.in
//——————————————————————————


// get 50-day average volume and compare today’s volume
Vfifty = MA(V, 50);
Volidx = V/Vfifty;

// set the RSI period
myRSI = RSI(8);

// scan for a rising RSI double bottom in a 21-day window
Monthlow = LLV(myRSI, 21);
Lastlow = LLV(myRSI, 8);
Higherlow = Monthlow < Lastlow;
rsimin = (Lastlow < 30) AND Higherlow AND myRSI < 50;

// scan for a falling RSI double top in a 21-day window
Monthhigh = HHV(myRSI, 21);
Lasthigh = HHV(myRSI, 8);
Lowerhigh = Monthhigh > Lasthigh;
rsimax = (Lasthigh > 70) AND Lowerhigh AND myRSI > 60;

Filter = (C > 2) AND (Vfifty > 10000);

Buy = Filter AND RSImin;

Sell = RSImax;

Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );


AddColumn( C, “Price”, format = 1.2);
AddColumn( V, “Vol”, format = 1.0);
AddColumn( Volidx, “Vol/50day Vol”, format = 1.1);
AddColumn( Buy, “Buy”, format = 1.0 );
AddColumn( Sell, “Sell”, format = 1.0 );

 

Download File

error: Content is protected !!