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

[amibroker] Please help on issues with buy and sell on the same day


  • Date: Sun, 27 Dec 2009 23:58:21 -0000
  • From: "yimapo" <yimapo@xxxxxxxxx>
  • Subject: [amibroker] Please help on issues with buy and sell on the same day

PureBytes Links

Trading Reference Links

I'm playing with a long-only scalping strategy. The idea is to buy at today's closing price and sell on the next day if next day's price reaches profit target. Following is the simple script I wrote:

Buy = 1;
BuyPrice = Ref(C,-1);
Sell = H > Ref(C,-1) + 0.25;
SellPrice = Ref(C,-1) + 0.25;

Hence, there are both buy and sell on the same day but the buy actually sell occurs before buy because buy always occurs at market close. However, the back test results show that Amibroker reversed the order of buy and sell, i.e., instead of selling the shares purchased at yesterday's close, shares which haven't been bought are sold. How can I tell which trade occurs first on the same day? Thanks.



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/