DALEˆ ! Enter Long (Buy) at the current daily price close of the S&P 500 Stock Index Futures ! CSI Perpetual Contract when %K Stochastic (with K equal to seven days, and ! smoothed by a three-day simple moving average) is less than 30 and the current ! day's price close is greater than yesterday's 271-day exponential moving average ! of the daily closing prices. ! Close Long (Sell) at the current daily price close of the S&P 500 Stock Index Futures ! CSI Perpetual Contract when %K Stochastic (with K equal to seven days, and smoothed ! by a three-day simple moving average) is greater than 70 or the current day's price ! close is less than yesterday's 271-day exponential moving average of the daily closing prices. ! Enter Short (Sell Short) at the current daily price close of the S&P 500 Stock Index Futures ! CSI Perpetual Contract when %K Stochastic (with K equal to seven days, and smoothed ! by a three-day simple moving average) is greater than 70 and the current day's price close ! is less than yesterday's 271-day exponential moving average of the daily closing prices. ! Close Short (Cover) at the current daily price close of the S&P 500 Stock Index Futures ! CSI Perpetual Contract when %K Stochastic (with K equal to seven days, and smoothed ! by a three-day simple moving average) is less than 30 or the current day's price close ! is greater than yesterday's 271-day exponential moving average of the daily closing prices. !! STOCHASTICS WITH MOVING AVERAGE FILTER (SMAF) ! Author: Robert Colby, interview, TASC December 2006 ! Coded by: Richard Denning 10/09/06 !! STOCHASTICS & SK-SD [%K-%D] Define L 7. Define S1 3. ! %K NO SMOOTHING: Stoch is 100*(([close] - loval([low],L)) / (hival([high],L) - loval([low],L))). ! SMOOTHED %K: SK is SimpleAvg(Stoch,S1). ! 271-DAY EXPONENTIAL AVERAGE: EMA271 is expavg([close],271). ! LONG ENTRY RULE: LE if SK<30 and [close] > valresult(EMA271,1) and hasdatafor(280)>=271. ! LONG EXIT RULE: LX if SK>70 or [close]70 and [close]=271. ! SHORT EXIT RULE: SX if SK<30 or [close]>valresult(EMA271,1). ! SMAF AS MARKET TIMING: LE_MKT if TickerRule("NDX",LE). LX_MKT if TickerRule("NDX",LX). SE_MKT if TickerRule("NDX",SE). SX_Mkt if TickerRule("NDX",SX). ! SMAF AS GROUP TIMING: LE_GRP if TickerRule(RSTicker(),LE). LX_GRP if TickerRule(RSTicker(),LX). SE_GRP if TickerRule(RSTicker(),SE). SX_GRP if TickerRule(RSTicker(),SX). PV if [close] > 5 and expavg([volume],50) > 5000. ! SMAF AS MARKET, GROUP, & STOCK TIMING: LE_MGS if LE_MKT and LE_GRP and LE and PV. LX_MGS if LX_MKT or LX_GRP or LX. SE_MGS if SE_MKT and SE_GRP and SE and PV. SX_MGS if SX_MKT or SX_GRP or SX. ! AIQ RELATIVE STRENGTH REPORTS ! Parameters supplied by AIQ for weights were 40%, 20%, 20%, 20%. Define length 30. Q3 is length/4. Q2 is (length - Q3) / 3. Q1 is (length - Q2 - Q3) / 2. Q0 is length - Q1 - Q2 - Q3. ROCq3 is (val([close],Q2,(Q1+Q0)) - val([open],Q3,(Q2+Q1+Q0))) / val([open],Q3,(Q2+Q1+Q0)) * 100. ROCq2 is (val([close],Q1,Q0) - val([open],Q2,(Q1+Q0))) / val([open],Q2,(Q1+Q0)) * 100. ROCq1 is (val([close],Q0,0) - val([open],Q1,Q0)) / val([open],Q1,Q0) * 100. ROCq0 is ([close] - val([open],Q0,0)) / val([open],Q0,0) * 100. RS_AIQ is ROCq0 * 0.40 + ROCq1 * 0.20 + ROCq2 * 0.20 + ROCq3 * 0.20.  Rule Libraryÿÿ CCodeViewLE_MGSÿÿ CReportViewÐSymbolÀ<SE_MGS€ÐSymbolÀ<LE€ÐSymbolÀFSE€ÐSymbolÀFINAS100ÿÿÿÿÿÿ CBackTestPropertyLELXPPA I0Colby Interview LENDXPNAS100 ø ã@È ã@ÿÿÿÿ –à@à ã@€SESX PdA I0Colby Interview SESPXPNAS100 ø ã@È ã@ÿÿÿÿ –à@à ã@€LE_MGSLX_MGSPPA LColby Interview LE_MGSSPXPNAS100 UUUUu ã@H ã@ÿÿÿÿ –à@@ ã@€SE_MGSSX_MGSPPA LColby Interview SE_MGSSPXPNAS100 UUUUu ã@H ã@ÿÿÿÿ –à@@ ã@00:00