// Downloaded From https://www.WiseStockTrader.com
PositionQuan   = Param("No. of Positions", 5, 1, 20, 1);
SetOption("InitialEquity", 10000 );
PositionSize = 10000/PositionQuan;
MarketLiquidity = Param("Liquidity in Mill's", 0.3, 0.1, 10, 0.1) *1000000;

BuyStartDate = ParamDate( "Buy Start Date", "2000-01-01" );
EndDate = ParamDate( "Last Buy Date", "2020-01-01" );
DateOK = IIf(DateNum() >= BuyStartDate  AND DateNum() <= EndDate, 1, 0);
LiqudityOK = MA(V, 20) * MA(C, 20) >= MarketLiquidity;


RSIPeriod = Param("RSI Period", 7, 2, 10, 1);
EntryRSI = Param("EntryRSI", 4, 4, 20, 2);

Buy = Filter = RSI(RSIPeriod ) < EntryRSI  AND LiqudityOK AND DateOK AND C > MA(C,150) ;

Sell = RSI(RSIPeriod ) > 65;
AddColumn(C, "Close");