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

RE: [amibroker] String lists



PureBytes Links

Trading Reference Links

-see bottom post

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx> wrote:
> 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.

Thank you to both Gary and Dimitris, I think I have it now. The next 
question: is it possible to have two different position sizes 
depending on the trade? Take 100% position on the intermediate term 
buy, take a 50% position on the swing buy?



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/