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

Re: [amibroker] Function for entry stop / limit order



PureBytes Links

Trading Reference Links

Guess that's right, no built in Buystop (like ApplyStop), but what 
Graham posted does exactly the same.
Explanation of BuyPrice: Let's say your Buy-Array triggers on a 
particular bar --> you buy the stock. And because AB needs to know at 
which price to buy, it gets the value from BuyPrice. If you'd like to 
trade on Open, set Buyprice = Open; if you'd like to enter the trade a 
tick above yesterday's high price, you just have to set the BuyPrice to 
that value. The PriceBoundChecking assures that this value is in the 
High-Low range of the bar your trade is in.
Needless to say, make sure your rules don't look into the future (e.g. 
always buy on Low) ;)

Regards,
Andreas

Mr. Blue Blau wrote:
> Thank you !
> It seem that AFL don't have a built in buystop function...is that right ?
> I don't know how to use the buyprice is...any help ?
> Need to learn more this weekend :)
> 
> On 9/2/05, Graham <kavemanperth@xxxxxxxxx> wrote:
>  >  Provided I understand yur query, just create a statement that outlines
>  >  your requirements
>  > 
>  >  SetOption( "PriceBoundChecking", 1 );
>  >  settradedelays(0,0,0,0);
>  >  ticksize = 0.01;
>  >  Buy = Cross( H, ref(h,-1) ); // should trigger only when high crosses
>  >  above previous bar high
>  >  Buyprice = ref(H,-1)+ticksize;
>  > 
>  >  if this is not the only condition then just ass them to the buy 
> statement
>  > liine
>  > 
>  >  //ticksize is reserved variable and can be set per symbol in symbol
>  > information
>  > 
>  >  On 9/2/05, Richard Taylor <ricardo.juangga@xxxxxxxxx> wrote:
>  >  > Hi All,
>  >  >
>  >  > I need to write again my question. Is there any function in AFL for
>  >  > entry stop / limit order ? e.g put entry stop long order on the
>  >  > previous day high + 1 tick. How to do that ?
>  >  > In the reference I can only find buy/sell or short/cover or buyprice/
>  >  > shortprice.
>  >  >
>  >  > Thank you for the help.
>  >  > BTW I'm new to this language
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  >
>  >  > 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 --------------------~--> 
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/r7D80C/dlQLAA/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/