PureBytes Links
Trading Reference Links
|
Eric,
Supposing your IB, IS, SB and SS are binary, ie their value is 1 OR
0, your logic rules are
IB=...;
IS=...;
SB=...;
SS=...;
Buy=IB OR (IS AND SB);
Sell=IS AND (SB==0 OR SS);
You don't need any IIF statement.
[Amibroker can not recognize a line
trade=IIF(IB,Buy,IIF(IS,Sell,0));
because Buy, Sell are not defined before their use [initialised]]
Dimitris Tsokakis
> ericleake <eleake@xxxx> wrote:
> I'm trying to construct a scenario to test two signals together,
but
> not sure how to approach it in Amibroker. I have two signals, one
> that is a very short term swing trade and another intermediate
term.
> I would like to test both in the same portfolio, at the same time,
> but am having difficulty with what I assume would be an IIf
> statement.
>
> The rules would be something like this:
>
> If Intermediate term buy =buy, ignore everything else.
> If Intermediate term sell AND no swing buy =sell.
> If Intermediate term sell AND swing Buy =buy.
> If Intermediate term sell and swing sell =sell.
>
> I have made several attempts at this, but failed miserably. I won't
> embarass my self by giving examples!
>
> Any help would be much appreciated.
>
> -Eric.
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/amibroker/
>
> To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs
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
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|