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

RE: [amibroker] Re: Market Position?



PureBytes Links

Trading Reference Links

The problem I found with using either of these methods is I'd like to
know my position BEFORE my Buy-Sell statements. To solve this I run my
own Buy-Sell conditions first as in myBuy = condition, etc.

Then I do either of the methods shown and can take further action before
setting the "real" Buy, Sell.
--
Terry
| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
| Behalf Of Joel
| Sent: Friday, September 02, 2005 20:54
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: [amibroker] Re: Market Position?
| 
| 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
| 
| 
| 
| 
| 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a difference. Find and fund world-changing projects at GlobalGiving.
http://us.click.yahoo.com/PcNrnD/PbOLAA/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/