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

*****SPAM***** [amibroker] Help Please !!!How to control sell time with Barsince for more than 1 stocks?


  • Date: Thu, 04 Mar 2010 22:17:09 -0000
  • From: "Tao" <tjin_99@xxxxxxxxx>
  • Subject: *****SPAM***** [amibroker] Help Please !!!How to control sell time with Barsince for more than 1 stocks?

PureBytes Links

Trading Reference Links

SPAM: -------------------- Start SpamAssassin results ----------------------
SPAM: This mail is probably spam.  The original message has been altered
SPAM: so you can recognise or block similar unwanted mail in future.
SPAM: See http://spamassassin.org/tag/ for more details.
SPAM: 
SPAM: Content analysis details:   (6.30 hits, 5 required)
SPAM: USER_AGENT         (-0.5 points) Found a User-Agent header
SPAM: FROM_ENDS_IN_NUMS  (0.9 points)  From: ends in numbers
SPAM: PLING_QUERY        (0.1 points)  Subject has exclamation mark and question mark
SPAM: TO_BE_REMOVED_REPLY (0.4 points)  BODY: Says: "to be removed, reply via email" or similar
SPAM: SPAM_PHRASE_03_05  (1.1 points)  BODY: Spam phrases score is 03 to 05 (medium)
SPAM:                    [score: 4]
SPAM: DATE_IN_PAST_48_96 (1.4 points)  Date: is 48 to 96 hours before Received: date
SPAM: FORGED_YAHOO_RCVD  (1.4 points)  'From' yahoo.com does not match 'Received' headers
SPAM: PLING_PLING        (1.5 points)  Subject has lots of exclamation marks
SPAM: 
SPAM: -------------------- End of SpamAssassin results ---------------------

Hi,

Basically I scan 500 stocks everyday to find stocks that have buy signal(such as price have crossed MA 50). Then I buy the stocks and exit them in 5 days after I boought them.

MA=EMA(C,50);
Buy = Cross( MA, C );
Sell = BarsSince(Buy)>5;

But the backtester don't sell stocks exactly 5 days after I bought them.
 
Say yesterday I bought stock A,  today I bought stock B. 
The backtester will sell both A and B 5 days after today, which is not what I really want!

What I want is to sell stock A 5 days after the time I bought A which is yesterday not today. 

Basically I want to have sell time for each stock to be 5 days after their individaul purchase dates.
But "Sell = BarsSince(Buy)>5;" can't do that.

Please help!

Thanks a lot

Tao











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

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