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

Re: [amibroker] Buyprice question



PureBytes Links

Trading Reference Links

what trade delays are you using for your backtesting
If you are entering on the bar of the signal, I suggest 2 things
zero trade entry delay settradedelays(0,0,0,0);
and use high instead of close fpr long trades, as close may be back below
your signal price and you would have entered because the price during that
bar had already crossed. If you use close price then you cannot enter on
that bar, and must enter the next bar as close price does not occur until
the bar is actually finished. This of course would not apply if this is a
automated trading in which case close just represents the last price traded
during the formation of the bars. sorry gets complicated for em to explain
fully and my fingers have given up.


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 31/12/06, ymtrader1 <ymtrader1@xxxxxxxxx> wrote:
>
> I am using 30min charts and would like to backtest a system where I
> buy on dips below a given price level and sell at another price level.
> It is possible to buy & sell within the same price bar.  So I tried
> the following:
>
> buy = cross(pricelevel,c);
>
> but buyprice wasn't being set to pricelevel; it was being set to bar
> close.
>
> so I tried:
>
> buy = cross(c,pricelevel);
> buyprice = pricelevel;
>
> But buyprice is still being set to bar close.  How do I set buyprice
> to the variable pricelevel for each buy?
>
> thx,
>
> Joe
>
>
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.0/610 - Release Date: 12/30/2006 2:59 PM