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

RE: [amibroker] using BuyPrice in real trading



PureBytes Links

Trading Reference Links

Eric,

I think this will give bogus results. Take an example (from daily
prices, you didn't specify):

INTC on Friday was:
Last Trade:	26.81
Trade Time:	Nov 25
Day's Range: 26.54 - 27.15

So your formula will return:
Close - (.5 *(High-Low));
26.81 - (.5 * (27.15-26.54)) = 26.505

So, you are setting a BuyPrice that is below the low of the day in this
random example. Graham said AB will then take the Low instead since you
are out-of-bounds. Depending on when your signal is generated and when
you're buying, it appears to me that you are forcing a buy at the lowest
possible price and probably selling higher. If you sell at the Close it
is guaranteed to be higher and always make money. If you find a way to
do this with your broker, please let me know ;-)
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Graham
Sent: Sunday, November 27, 2005 17:25
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] using BuyPrice in real trading

You can define what price you want for BuyPrice and the other trade
price variables.
It will use these prices for your trades, unless the actual bar of the
entry/exit does not cover that price then it will use the closest bar
price (eg H or L ).
You can also turn this feature off and the actual price as calculated
is used, but this would not really give you real results for most
trading backtests.

As to whether your price would be possible in real trading it is hard
to determine. I generally always use the high or low price for
backtesting to provide the worst case scenario of prices (buyprice=H,
sellprice=L). If it makes profit with these then you can hope real
trading to provide better returns.

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm


On 11/28/05, eric paradis <thechemistrybetweenus@xxxxxxxxx> wrote:
> I backtested using the following code and my return
> went up significantly. Is it likely that I would get
> filled with this strategy? Does Amibroker provide an
> adequate testing for these types of orders?
>
> BuyPrice = Close - (.5 *(High-Low));
>
> Thanks,
>
> Eric



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 --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/