PureBytes Links
Trading Reference Links
|
Thanks, I'll try that, though I did come up with:
LongBarsSince = BarsSince(Buy);
ShortBarsSince = BarsSince(Sell);
MP = IIf(LongBarsSince < ShortBarsSince,1,-1);
haven't figured out how this would work for Flat, but my current
system is always in market... so no biggee.
Think I'll give your method a go though, so I have the Flat
availaible.
Thanks;
Zen
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> you could simply write
>
> inLong = flip(buy,sell);
> inShort = flip(short,cover);
> inNothing = inLong==0 and inShort==0;
>
> On 9/3/05, Joel <shadowzen@xxxx> wrote:
> > Is there a global variable that lets you determine what your
current
> > Market Position is (Long, Short or Flat)? If not, does anyone
know a
> > way to write some APL to provide it, ie: MP = -1 if Short, 1 if
Long,
> > 0 if Flat.
> >
> > Thanks;
> >
> > Zen
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
------------------------ Yahoo! Groups Sponsor --------------------~-->
Help tsunami villages rebuild at GlobalGiving. The real work starts now.
http://us.click.yahoo.com/njNroD/KbOLAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
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 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/
<*> 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/
|