Average True Range free
Description
The range of a day's trading is simply high − low. The true range extends it to yesterday's closing price if it was outside of today's range. true range = max(high, close(prev) - min(low, close(prev) The true range is the largest of the: * Most recent period's high less the most recent period's low * Absolute value of the most recent period's high less the previous close * Absolute value of the most recent period's low less the previous close.
Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
u s i n g c A l g o . A P I ; u s i n g c A l g o . A P I . I n d i c a t o r s ; n a m e s p a c e c A l g o . I n d i c a t o r s { [ I n d i c a t o r ( I s O v e r l a y = f a l s e , S c a l e P r e c i s i o n = 5 , A c c e s s R i g h t s = A c c e s s R i g h t s . N o n e ) ] p u b l i c c l a s s A v e r a g e T r u e R a n g e : I n d i c a t o r { p r i v a t e T r u e R a n g e _ t r i ; [ P a r a m e t e r ( D e f a u l t V a l u e = 1 4 , M i n V a l u e = 2 ) ] p u b l i c i n t P e r i o d { g e t ; s e t ; } [ O u t p u t ( "