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

[amibroker] Re: In Trade Index



PureBytes Links

Trading Reference Links

Graham you are the man. Beautiful mind!

Drew


--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> Just logic
> inTrade = iif(Flip(Buy,Sell),1,iif(Flip(short,cover),-1,0)) ;
> 
> The previous solution that I said was wrong can be easily fixed, I
> just preferred to go with IIF instead
> 
> inTrade = 2 * Flip(Buy,Sell) - 1;
> similarly for this question
> inTrade = Flip(Buy,Sell) - Flip(short,cover);
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> 
> -- 
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://www.aflwriting.com
> 
> 
> On 23/03/07, thomasdrewyallop <drewyallop@xxx> wrote:
> > Hi Graham,
> >
> > Elegant!
> >
> > How would you change it to get this:
> >
> > If I am long then 1
> > If I am short then -1
> > If I am out of market then 0
> >
> > Feeling alright?
> >
> > Drew
> >
> >
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/