PureBytes Links
Trading Reference Links
|
Thanks a lot. That was so simple after two days of trying every
posible combination if IIf's and )'s and ,'s I could think of.
--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> I had the same problem. A solution is the following:
>
> BuyState[0] = 0; //Initialize before you use them.
> ShortState[0] = 0; //Youšll probably want to access them within your
> Buy/Sell statements or maybe sooner.
>
> //Your code
>
> Buy = ??;
> Sell = ??;
> Short = ??;
> Cover = ??;
>
> BuyState = Flip(Buy,Short);
> ShortState = Flip(Short,Buy);
>
> Regards,
>
> Terry
> --
>
> > I am trying to do a 'Addcolumn' in Explore that will show a 1
every
> > day the Buy is in effect rather than a 1 just on the day it
becomes a
> > Buy.
> >
> > I can do it in Excel by using several 'If' statements.
> > In Amibroker my 'Newbuy' column would be something like;
> > IIF(Buy,IIf(Sell,IIf(Ref(Buy,1),1,0)));
> >
> > Thanks for your help, Joe
> >
> >
> >
> >
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> >
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> >
> > Yahoo! Groups Sponsor
> >
> > ADVERTISEMENT
> >
> >
<http://us.ard.yahoo.com/SIG=129no1tno/M=295196.4901138.6071305.300117
6/D=grou
> >
ps/S=1705632198:HM/EXP=1090947470/A=2128215/R=0/SIG=10se96mf6/*http://
companio
> > n.yahoo.com>
> >
> >
> > 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
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> > *
> > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service
> > <http://docs.yahoo.com/info/terms/> .
> >
>
>
> --
> Terry
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
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/
|