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

[amibroker] Re: How do you get a value for ATR?



PureBytes Links

Trading Reference Links


Terry & Graham - thankyou very much.  The "Plot" command worked just 
fine.  While backtesting the simple formula below (and using 
the "Plot" command to figure out ATR), I realised that if 
the 'BuyPrice' was outside the High-Low range of the bar, then the 
backtest took the H or L as the 'BuyPrice'.  

How do I get the 'BuyPrice' to only function, during backtesting, 
when it falls whithin the H-L of a bar and skip all other bars ?

While searching the 'help' index, I came across this - 

"During back-testing AmiBroker will check if the values you assigned 
to buyprice, sellprice, shortprice, coverprice fit into high-low 
range of given bar. If not, AmiBroker will adjust it to high price 
(if price array value is higher than high) or to the low price (if 
price array value is lower than low)".

Again - the qts is - how do I disable the above, so it only backtests 
a trade that falls in the H-L range of the bar?





--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> x= O > H(-1);
> Buy = (x,-1);
> BuyPrice = (O + 0.6*ATR(3),-1);
> 
> I think this should be in AFL, or some other combination of the ref
> 
> x = O > ref(H,-1);
> buy = ref(x,-1);
> buyPrice = ref(O + 0.6*ATR(3),-1);
> 
> On Apr 8, 2005 5:49 AM, Terry <MagicTH@xxxx> wrote:
> > 
> > Just plot it.
> > Plot(0.6*ATR(3),colorred,styleownscale);
> > 
> > Terry
> > 
> > Dickie Paria wrote:
> > 
> > >Here's a simple runaway gap formula from one of Larry Williams 
books
> > >that I was playing around with
> > >
> > >x= O > H(-1);
> > >Buy = (x,-1);
> > >BuyPrice = (O + 0.6*ATR(3),-1);
> > >.
> > >.
> > >.
> > >
> > >When backtesting the system I notice that the BuyPrice on trades 
is as
> > >indicated in formula ("Open + 0.6*ATR(3)").  However, how do I 
get
> > >the 'actual' ATR(3) number displayed so that I can check it ?
> > >
> > >
> > >
> > >
> > >
> > >
> > >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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > 
> > 
> > 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
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/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/