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

Re: [amibroker] Re: ATR on Closes only?



PureBytes Links

Trading Reference Links

Hello,
 
That is fairly easy to find out.
 
True range is the greatest of the following:
  • The current high less the current low.
  • The absolute value of: current high less the previous close.
  • The absolute value of: current low less the previous close.
When O == H == L == C this you can replace high/low/open in the sentence above with close and you get:
 
greatest from:
  • The current close less the current close ( == ZERO ) 
  • The absolute value of: current close less the previous close. (= Abs( C - Ref( C, -1 ) );
  • The absolute value of: current close less the previous close. ( the same as above )
  •  
    So the greatest of this three is simply
     
    Abs( C - Ref( C, -1 ) )

    Best regards,
    Tomasz Janeczko
    amibroker.com
    ----- Original Message -----
    From: Erik Skyba
    Sent: Saturday, April 29, 2006 12:22 AM
    Subject: Re: [amibroker] Re: ATR on Closes only?

    Tomaz, but how does AB calculate TR when O,H,L,C are all recognized as C with mutual funds within AB?
     
    Thanks,
     
    Erik Skyba
    ----- Original Message -----
    Sent: Thursday, April 27, 2006 2:04 PM
    Subject: Re: [amibroker] Re: ATR on Closes only?

    Hello,
     
    Your question is answered in the help file:
     
    (see 2nd comment).

    Best regards,
    Tomasz Janeczko
    amibroker.com
    ----- Original Message -----
    From: ericleake
    Sent: Thursday, April 27, 2006 7:30 PM
    Subject: [amibroker] Re: ATR on Closes only?

    Thanks Tim-
    That doesn't quite do it. The problem is I am using ATR() with
    mutual funds, and am now applying the same model to indexes. The
    indexes have H,L data which the mutual funds do not. I am getting
    wildly different results (100's of trades versus 10's) with the
    indexes versus the funds.

    Anyone know how AB calculates ATR? In looking at the original
    formula from Wilder, there are a few ways of going about it. I would
    like to be able to duplicate AB's ATR function while only
    referrencing "Close" in the calculation.

    -eric.

    --- In amibroker@xxxxxxxxxxxxxxx, Tim Gadd <timgadd@xxx> wrote:
    >
    > Eric,
    >
    > If i understand your question, wouldn't
    >
    > abs(MA(Roc(c, 1), x));
    >
    > give you the average range between bar-to-bar closing
    > prices (regardless of up or down) for period x?
    >
    > Tim
    >
    > --- ericleake <eleake@xxx> wrote:
    >
    > > Can anyone think of a way to use the ATR function on
    > > just the Close
    > > array, instead of examining H and L ?
    > >
    > > Thanks!
    > > -Eric
    > >
    > >
    > >
    > >
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam?  Yahoo! Mail has the best spam protection around
    > http://mail.yahoo.com
    >






    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





    SPONSORED LINKS
    Investment management software Real estate investment software Investment property software
    Software support Real estate investment analysis software Investment software


    YAHOO! GROUPS LINKS