Graham you are the man. Beautiful mind!

Drew


--- In [email protected], Graham <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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
> >
> >
>


Reply via email to