[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Winning Systems



PureBytes Links

Trading Reference Links

Here is an interesting system. I gravitate toward the simplicity and
underlying concept of the system.

I think I have coded it accurately from an article in the most recent
issue of Technical Analysis of Stocks and Commodities. No guarantees.
The author seems to gravitate toward commodities rather than stocks and
shows no stock related results.

Backtesting on my stock list shows a modest profit. Examining the graphs
by eye (Indicator Builder) shows that there is a significant lag in the
system (particularly on position entry). So, smart people should be
able to improve on it.

I would be interested in hearing your and other's thoughts and the
results of any experimenting.

Best regards,
-Tom McDaniel



/* Trend Detection Index */
/* Developed by M.H. Pee */
/* From Technical Analysis of Stocks and Commodities, October, 1991 p. 54 */
/* Coded by T.L. McDaniel September, 1991 */


MaxGraphs = 2;
Period = 20;

TDM = ( Close - Ref (Close, -Period));
ATDM = ABS (TDM);
PTDI = SUM (TDM, Period);
ATDI = ABS (PTDI);
FDAM = SUM (ATDM, 40);
SATDM = SUM( ATDM, 20);
TDI = (ATDI + SATDM) - FDAM;

Graph0 = TDI;
Graph1 = PTDI;

Buy = iif (PTDI > 0 AND TDI >0, 1, 0);
/* Sell = Cross (0, PTDI); */
Short = iif (PTDI < 0 AND TDI >0, 1, 0);
Sell = Short;
/* Cover = Cross (PTDI, 0); */
Cover = Buy; 

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