PureBytes Links
Trading Reference Links
|
After the RSI() example, we may generalise the OUT/UNDER
performance using the following definition:
A stock UNDERperforms the market when an Indicator is lower
than the respective MeanIndicator and
OUTperforms the market when an Indicator is higher than the
respective MeanIndicator.
To see the impact on trading systems let us give some
examples:
The MeanStochD, the MeanRSI and the MeanDratio.
In AA window paste the
Dratio=500<FONT
size=2>*(H-L)/(H+L);<FONT face=Verdana
size=2>
Dratio40=DEMA<FONT
face="Times New Roman">(Dratio,40<FONT
size=2>);<FONT face=Verdana
size=2>
AddToComposite(Dratio40,<FONT
size=2>"~SUMDratio40","C"<FONT
face=Verdana size=2><FONT
face="Times New Roman">);
AddToComposite(StochD(),"~SUMSTOCHD","C");<FONT
size=2>
AddToComposite(RSI(),"~SUMRSI","C");
AddToComposite(1,"~COUNT","V");
Buy=0;
scan for all stocks, all quotations and create the respective
MeanIndicators
MeanDratio=Foreign("~SUMDratio40","C")/Foreign("~COUNT","V");
MeanRSI=Foreign("~SUMRSI","C")/Foreign("~COUNT","V");
MeanStochD=Foreign("~SUMSTOCHD","C")/Foreign("~COUNT","V");
useful to write the OUT/UNDERperformance Conditions
OUTpSTOCHD=StochD()>MeanStochD;
UNDERpSTOCHD=StochD()<=MeanStochD;
OUTpRSI=RSI()>MeanRSI;
UNDERpRSI=RSI()<=MeanRSI;
Dratio=500*(H-L)/(H+L);<FONT
face=Verdana size=2><FONT
face="Times New Roman">
Dratio40=DEMA(Dratio,<FONT
size=2>40);<FONT
size=2>
OUTpDRATIO=Dratio40>MeanDratio;
UNDERpDRATIO=Dratio40<=MeanDratio;
and, finally, enhance your trading rules with the above
conditions.
Example
Buy=...your Buy rule here
Sell=...your Sell rule here
Buy=Buy AND OUTpSTOCHD;// Buy only when the stock Outperforms
the market, according to StochD criterion
Sell=Sell AND UNDERpDRATIO;// Sell only when the stock
Underperforms the market, according to Dratio criterion
Some combinations are quite interesting and may improve your
results.
Dimitris Tsokakis
[to be continued]
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|