Envelopes free
Description
Moving Average Envelopes are percentage-based envelopes set above and below a moving average. The moving average, which forms the base for this indicator, can be a simple or exponential moving average. Each envelope is then set the same percentage above or below the moving average. This creates parallel bands that follow price action. With a moving average as the base, Moving Average Envelopes can be used as a trend following indicator. However, this indicator is not limited to just trend following. The envelopes can also be used to identify overbought and oversold levels when the trend is relatively flat.
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 = t r u e , 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 E n v e l o p e C h a n n e l s : I n d i c a t o r { p r i v a t e i n t P e r i o d = 1 0 ; p r i v a t e M o v i n g A v e r a g e e x p o ; [ P a r a m e t e r ( D e f a u l t V a l u e = 2 0 ) ] p u b l i c i n t E n v e l o p e P e r i o d { g e t ; s e t ; } [ P a r a m e t e r ( D e f a u l t V a l u e = 0 . 5 ) ] p u b l i c d o u b l e B a n d D i s t a n c e { g e t ; s e t ; } [ O u t p u t ( "