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

[amibroker] Re: How to specify a different buy price than C,O,H,L, AV in Backtester AFL code


  • Date: Mon, 18 Jan 2010 09:05:17 -0000
  • From: "Mike" <sfclimbers@xxxxxxxxx>
  • Subject: [amibroker] Re: How to specify a different buy price than C,O,H,L, AV in Backtester AFL code

PureBytes Links

Trading Reference Links

Try something like this:

YesterdayHigh = Ref(High, -1);
Threshold = YesterdayHigh * 1.01;
Buy = High >= Threshold;
BuyPrice = max(Open, Threshold);

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "nuggettrader" <matti.vataja@xxx> wrote:
>
> I need to know how to specify a different buy price than C,O,H,L,AV in Backtester AFL code. I use TeleChart end of day data. For example I want to buy if and when a stock tops yesterday's High by 1%. In other words if today's High is at least 1% higher than yesterday's High then I would get a buy signal at some time during the trading day regardless if the stock closes 1% or more higher or not. How do I code this in AFL?
>




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

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