PureBytes Links
Trading Reference Links
|
When I try to back test the fowling program I get this AFL
Error message:
Bad args.
0-th argument of function call has invalid (or unsupported)
type at line 20, column 21:
StochRsi=EMA((RSI(RS)
--------------------^
I can not figure out why the RS variable does not work and
the B and S variable work fine.
<font
size=1 color=black face="Courier New">Bull=<font size=1 color=fuchsia
face="Courier New">9<span
>;
<font
size=1 color=black face="Courier New">Bear=-<font size=1 color=fuchsia
face="Courier New">3<span
>;
<font
size=1 color=black face="Courier New">Trend = <font size=1 color=blue
face="Courier New">IIf<span
>(Bull<<font
size=1 color=blue face="Courier New">ROC<font size=1 color=black
face="Courier New">(<span
>EMA<font
size=1 color=black face="Courier New">(C,<font
size=1 color=fuchsia face="Courier New">50<font size=1
color=black face="Courier New">), <span
>14<font
size=1 color=black face="Courier New">),<font size=1 color=fuchsia
face="Courier New">1<span
>,<font
size=1 color=blue face="Courier New">IIf<font size=1 color=black
face="Courier New">(Bear<<span
>ROC<font
size=1 color=black face="Courier New">(<font size=1 color=blue
face="Courier New">EMA<span
>(<span
>C,<font size=1 color=fuchsia
face="Courier New">50<span
>), <font
size=1 color=fuchsia face="Courier New">14<font size=1
color=black face="Courier New">),<span
>2<font
size=1 color=black face="Courier New">,<font size=1 color=fuchsia
face="Courier New">3<span
>));
<font
size=1 color=green face="Courier New">//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<font
size=1 color=black face="Courier New">
<font
size=1 color=black face="Courier New">B =<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">,<span
>17<font
size=1 color=black face="Courier New">,<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">2<font size=1
color=black face="Courier New">,<span
>63<font
size=1 color=black face="Courier New">, <font size=1 color=fuchsia
face="Courier New">22<span
>));
<font
size=1 color=black face="Courier New">S =<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">,<span
>58<font
size=1 color=black face="Courier New">,<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">2<font size=1
color=black face="Courier New">,<span
>79<font
size=1 color=black face="Courier New">, <font size=1 color=fuchsia
face="Courier New">83<span
>));
<font
size=1 color=black face="Courier New">RS=<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">1<font size=1
color=black face="Courier New">,<span
>14<font
size=1 color=black face="Courier New">,<font size=1 color=blue
face="Courier New">IIf<span
>(Trend == <font
size=1 color=fuchsia face="Courier New">2<font size=1
color=black face="Courier New">,<span
>7<font
size=1 color=black face="Courier New">, <font size=1 color=fuchsia
face="Courier New">4<span
>));
<font
size=1 color=black face="Courier New">
<font
size=1 color=black face="Courier New">Filter<font
size=1 color=black face="Courier New">=<font size=1 color=fuchsia
face="Courier New">1<span
>;
<font
size=1 color=blue face="Courier New">AddColumn<font size=1 color=black
face="Courier New">(Trend,<span
>"Trend"<font
size=1 color=black face="Courier New">);
<font
size=1 color=blue face="Courier New">AddColumn<font size=1 color=black
face="Courier New">(B,<span
>"B"<font
size=1 color=black face="Courier New">);
<font
size=1 color=blue face="Courier New">AddColumn<font size=1 color=black
face="Courier New">(S,<span
>"S"<font
size=1 color=black face="Courier New">);
<font
size=1 color=blue face="Courier New">AddColumn<font size=1 color=black
face="Courier New">(RS,<span
>"RS"<font
size=1 color=black face="Courier New">);
<font
size=1 color=blue face="Courier New">AddColumn<font size=1 color=black
face="Courier New">(<span
>ROC<font
size=1 color=black face="Courier New">(<font size=1 color=blue
face="Courier New">EMA<span
>(<span
>C,<font size=1 color=fuchsia
face="Courier New">50<span
>), <font
size=1 color=fuchsia face="Courier New">14<font size=1
color=black face="Courier New">),<span
>"ROC"<font
size=1 color=black face="Courier New">);
<font
size=1 color=black face="Courier New">
<font
size=1 color=black face="Courier New">StochRsi=<font size=1 color=blue
face="Courier New">EMA<span
>((<font
size=1 color=blue face="Courier New">RSI<font size=1 color=black
face="Courier New">(RS)-<span
>LLV<font
size=1 color=black face="Courier New">(<font size=1 color=blue
face="Courier New">RSI<span
>(RS),<font
size=1 color=fuchsia face="Courier New">8<font size=1
color=black face="Courier New">))/(<span
>HHV<font
size=1 color=black face="Courier New">(<font size=1 color=blue
face="Courier New">RSI<span
>(RS),<font
size=1 color=fuchsia face="Courier New">8<font size=1
color=black face="Courier New">)-<span
>LLV<font
size=1 color=black face="Courier New">(<font size=1 color=blue
face="Courier New">RSI<span
>(RS),<font
size=1 color=fuchsia face="Courier New">8<font size=1
color=black face="Courier New">)),<span
>3<font
size=1 color=black face="Courier New">)*<font size=1 color=fuchsia
face="Courier New">100<span
>;
<font
size=1 color=black face="Courier New">
<font
size=1 color=black face="Courier New">Buy<font size=1
color=black face="Courier New">=<span
>Cross<font
size=1 color=black face="Courier New">(B,StochRsi) AND
<span
>ADX<font
size=1 color=black face="Courier New">(<font size=1 color=fuchsia
face="Courier New">14<span
>) > <font
size=1 color=fuchsia face="Courier New">20<font size=1
color=black face="Courier New"> AND <font
size=1 color=blue face="Courier New">RSI<font size=1 color=black
face="Courier New">(<span
>4<font
size=1 color=black face="Courier New">)<<font size=1 color=fuchsia
face="Courier New">50<span
>;
<font
size=1 color=black face="Courier New">Sell<font size=1
color=black face="Courier New">=<span
>Cross<font
size=1 color=black face="Courier New">(StochRsi,S)AND
<span
>ADX<font
size=1 color=black face="Courier New">(<font size=1 color=fuchsia
face="Courier New">14<span
>) > <font
size=1 color=fuchsia face="Courier New">13<font size=1
color=black face="Courier New"> AND <font
size=1 color=blue face="Courier New">RSI<font size=1 color=black
face="Courier New">(<span
>4<font
size=1 color=black face="Courier New">)><font size=1 color=fuchsia
face="Courier New">50<span
>;
<font
size=1 color=black face="Courier New">Short<font
size=1 color=black face="Courier New">=Sell;<span
>Cover=Buy;
<font
size=1 color=black face="Courier New">
Thank you
Jim Hutchison
Yahoo! Groups Sponsor
ADVERTISEMENT
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.
|