PureBytes Links
Trading Reference Links
|
Jim,
IIF always returns array while RS accepts only number. To
convert use LastValue:
RS=
LastValue ( <SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>2<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>7<FONT
face="Courier New" color=black size=1><SPAN
>,
<SPAN
>4<FONT
face="Courier New" color=black size=1><SPAN
>))
);
<SPAN
>
Best regards,Tomasz
Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Jim Hutchison
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, February 18, 2003 2:55
PM
Subject: [amibroker] Need Help
<SPAN
><SPAN
>
<SPAN
>When I try to back test the
fowling program I get this AFL Error message:
<SPAN
>Bad
args.
<SPAN
>0-th argument of function call has
invalid (or unsupported) type at line 20, column
21:
<SPAN
>
<SPAN
>
<SPAN
>StochRsi=EMA((RSI(RS)
<SPAN
>--------------------^
<SPAN
>I can not figure out why the RS
variable does not work and the B and S variable work
fine.
<SPAN
>
<FONT
face="Courier New" color=black size=1><SPAN
>Bull=<FONT
face="Courier New" color=fuchsia size=1><SPAN
>9<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=black size=1><SPAN
>Bear=-<FONT
face="Courier New" color=fuchsia size=1><SPAN
>3<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=black size=1><SPAN
>Trend =
<SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Bull<<FONT
face="Courier New" color=blue size=1><SPAN
>ROC<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>EMA<FONT
face="Courier New" color=black size=1><SPAN
>(<SPAN
>C,<FONT face="Courier New"
color=fuchsia size=1><SPAN
>50<FONT
face="Courier New" color=black size=1><SPAN
>),
<SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Bear<<FONT
face="Courier New" color=blue size=1><SPAN
>ROC<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>EMA<FONT
face="Courier New" color=black size=1><SPAN
>(<SPAN
>C,<FONT face="Courier New"
color=fuchsia size=1><SPAN
>50<FONT
face="Courier New" color=black size=1><SPAN
>),
<SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>2<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>3<FONT
face="Courier New" color=black size=1><SPAN
>));
<FONT
face="Courier New" color=green size=1><SPAN
>//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<FONT
face="Courier New" color=black size=1><SPAN
>
<FONT
face="Courier New" color=black size=1><SPAN
>B
=<SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>17<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>2<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>63<FONT
face="Courier New" color=black size=1><SPAN
>,
<SPAN
>22<FONT
face="Courier New" color=black size=1><SPAN
>));
<FONT
face="Courier New" color=black size=1><SPAN
>S
=<SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>58<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>2<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>79<FONT
face="Courier New" color=black size=1><SPAN
>,
<SPAN
>83<FONT
face="Courier New" color=black size=1><SPAN
>));
<FONT
face="Courier New" color=black size=1><SPAN
>RS=<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=blue size=1><SPAN
>IIf<FONT
face="Courier New" color=black size=1><SPAN
>(Trend ==
<SPAN
>2<FONT
face="Courier New" color=black size=1><SPAN
>,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>7<FONT
face="Courier New" color=black size=1><SPAN
>,
<SPAN
>4<FONT
face="Courier New" color=black size=1><SPAN
>));
<FONT
face="Courier New" color=black size=1><SPAN
>
<FONT
face="Courier New" color=black size=1><SPAN
>Filter<FONT
face="Courier New" color=black size=1><SPAN
>=<FONT
face="Courier New" color=fuchsia size=1><SPAN
>1<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=blue size=1><SPAN
>AddColumn<FONT
face="Courier New" color=black size=1><SPAN
>(Trend,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>"Trend"<FONT
face="Courier New" color=black size=1><SPAN
>);
<FONT
face="Courier New" color=blue size=1><SPAN
>AddColumn<FONT
face="Courier New" color=black size=1><SPAN
>(B,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>"B"<FONT
face="Courier New" color=black size=1><SPAN
>);
<FONT
face="Courier New" color=blue size=1><SPAN
>AddColumn<FONT
face="Courier New" color=black size=1><SPAN
>(S,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>"S"<FONT
face="Courier New" color=black size=1><SPAN
>);
<FONT
face="Courier New" color=blue size=1><SPAN
>AddColumn<FONT
face="Courier New" color=black size=1><SPAN
>(RS,<FONT
face="Courier New" color=fuchsia size=1><SPAN
>"RS"<FONT
face="Courier New" color=black size=1><SPAN
>);
<FONT
face="Courier New" color=blue size=1><SPAN
>AddColumn<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>ROC<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>EMA<FONT
face="Courier New" color=black size=1><SPAN
>(<SPAN
>C,<FONT face="Courier New"
color=fuchsia size=1><SPAN
>50<FONT
face="Courier New" color=black size=1><SPAN
>),
<SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>"ROC"<FONT
face="Courier New" color=black size=1><SPAN
>);
<FONT
face="Courier New" color=black size=1><SPAN
>
<FONT
face="Courier New" color=black size=1><SPAN
>StochRsi=<FONT
face="Courier New" color=blue size=1><SPAN
>EMA<FONT
face="Courier New" color=black size=1><SPAN
>((<FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(RS)-<FONT
face="Courier New" color=blue size=1><SPAN
>LLV<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(RS),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>8<FONT
face="Courier New" color=black size=1><SPAN
>))/(<FONT
face="Courier New" color=blue size=1><SPAN
>HHV<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(RS),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>8<FONT
face="Courier New" color=black size=1><SPAN
>)-<FONT
face="Courier New" color=blue size=1><SPAN
>LLV<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(RS),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>8<FONT
face="Courier New" color=black size=1><SPAN
>)),<FONT
face="Courier New" color=fuchsia size=1><SPAN
>3<FONT
face="Courier New" color=black size=1><SPAN
>)*<FONT
face="Courier New" color=fuchsia size=1><SPAN
>100<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=black size=1><SPAN
>
<FONT
face="Courier New" color=black size=1><SPAN
>Buy<FONT
face="Courier New" color=black size=1><SPAN
>=<FONT
face="Courier New" color=blue size=1><SPAN
>Cross<FONT
face="Courier New" color=black size=1><SPAN
>(B,StochRsi)
AND <FONT
face="Courier New" color=blue size=1><SPAN
>ADX<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=fuchsia size=1><SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>) >
<SPAN
>20<FONT
face="Courier New" color=black size=1><SPAN
> <SPAN
>AND <FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=fuchsia size=1><SPAN
>4<FONT
face="Courier New" color=black size=1><SPAN
>)<<FONT
face="Courier New" color=fuchsia size=1><SPAN
>50<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=black size=1><SPAN
>Sell<FONT
face="Courier New" color=black size=1><SPAN
>=<FONT
face="Courier New" color=blue size=1><SPAN
>Cross<FONT
face="Courier New" color=black size=1><SPAN
>(StochRsi,S)<SPAN
>AND <FONT
face="Courier New" color=blue size=1><SPAN
>ADX<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=fuchsia size=1><SPAN
>14<FONT
face="Courier New" color=black size=1><SPAN
>) >
<SPAN
>13<FONT
face="Courier New" color=black size=1><SPAN
> <SPAN
>AND <FONT
face="Courier New" color=blue size=1><SPAN
>RSI<FONT
face="Courier New" color=black size=1><SPAN
>(<FONT
face="Courier New" color=fuchsia size=1><SPAN
>4<FONT
face="Courier New" color=black size=1><SPAN
>)><FONT
face="Courier New" color=fuchsia size=1><SPAN
>50<FONT
face="Courier New" color=black size=1><SPAN
>;
<FONT
face="Courier New" color=black size=1><SPAN
>Short<FONT
face="Courier New" color=black size=1><SPAN
>=<SPAN
>Sell;<SPAN
>Cover=<SPAN
>Buy;
<FONT
face="Courier New" color=black size=1><SPAN
>
<SPAN
>Thank
you
<SPAN
>
<SPAN
>Jim
HutchisonPost
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
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.
|