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

Re: [amibroker] rounding the buyprice



PureBytes Links

Trading Reference Links

Ok, I think Ive got ya.

When I start doing some proper backtesting - It will no doubt make itself 
obvious.

KR
Michael.


At 09:10 AM 4/03/2003 +1100, you wrote:
>Michael,
>       it originally just started when I wanted to set a stop 1 tick below
>yesterdays low, then I noticed that 1 tick below 51c was 50c, but 1 tick
>below 50c was 49.5c
>
>It also comes into play when I'm calculating position sizes based on (say)
>ATR.
>
>eg.
>EquityRisk = 1; // 1%
>InitialRisk = ATR(14)*2;
>InitialStop = BuyPrice - InitialRisk;
>PositionSize = -EquityRisk * BuyPrice/InitialRisk;
>
>can give a different result to
>EquityRisk = 1;
>InitialRisk = ATR(14)*2;
>InitialStop = nrASXtick(BuyPrice-IinitialRisk, 0, -1); // now a valid price
>InitialRisk = BuyPrice-InitialStop;  // adjusted to valid prices
>PositionSize = -ERisk * BuyPrice/InitialRisk;
>
>
>Although Tomasz has now added an option to the AA backtester to specify the
>ticksize, it stiil doesn't allow for ticksize changing as prices change.
>
>--
>       Nigel
>
>
>
>On Mon, 3 Mar 2003 09:47 pm, OzFalcon wrote:
> > Nigel,
> >
> > Can you explain the use of this dll?
> >
> > As I use ASX as well. Why did you need round?
> >
> > KR
> > Micahael.
> >
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
>
>Send BUG REPORTS to bugs@xxxxxxxxxxxxx
>Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
>-----------------------------------------
>Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
>(Web page:



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/