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

LinRegSlope system



PureBytes Links

Trading Reference Links

I tested 'LinRegSlope()' for finding good trending -
my favourite - system. Here is the result, copy, paste
and click 'optimize' in your AA window:

/*** BEGIN AFL CODE ***/
slow = Optimize("slow", 16, 15, 35, 1);
fast = Optimize("fast", 7, 2, 10, 1);
Max_drop = Optimize("Max drop", 2.5, 2, 8, 0.5);

Buy = LinRegSlope(C,slow) > 0 AND
Cross(LinRegSlope(C,fast), 0);

Sell = (HighestSince(Buy, Close) - Close) * 100 /
HighestSince(Buy, Close) >= Max_drop;

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
/*** END AFL CODE ***/

When 'LinRegSlope(C, slow)' is greater than '0', the
long-term trend is up. And when 'LinRegSlope(C, fast)'
cross 0 we have short-term trend down - usually there
is a correction and there is a good moment for buy.

The sense of code for sell signal is: When close is
Max_drop% lower than highest close from buy, sell.
There is good for profit protect.

With good optimization system gives good results - see
on the picture. But it has the quite big weakness:
system is quite sensitive on change of parameters that
is why the results on the future may be differents
from these in the past. Maybe a filter can help so you
are encourage to make your own experiments.


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Attachment: Description: ""