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

[amibroker] How to explore "sellprice"



PureBytes Links

Trading Reference Links

Hello,

  It seems I can't add columns to backrest result. I like to export 
arrays of some values (like gap) in order to see their effects on 
returns.

  I try to add the buyprice  and sellprice as columns exported from 
exploration without complete success. 

  This is an intraday database composed of 5 min data.  

  The buyprice is easy to get when I set filter =buy. However, I am 
having difficulties with the sellprice. I will sell the stock if the 
trail reaches 10% down or  stoploss reaches 6% or 4% down depends on 
buyprice. Here are the codes I used in backtest section:

Buy= buycondition;
Filter=buy;

Sell=  (DateNum()!= Ref(DateNum(),1));

trail =10;
ApplyStop (2,1,trail,1,True,0);

n=6; 
stoploss =IIf(BuyPrice<5,n,n-2);
ApplyStop (0 ,1, stoploss,1, True, 0);


Would you please help me on how to get the sellprice?  Since the 
exploration happens at buying point, the codes have to see data after 
that point to the end of the day. Thanks a lot.

William






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/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/