Stochastic Momentum Index free
Description
SMI Indicator is used to predict the trend prevailing in the market i.e. either bullish or bearish. The trend is bearish if its SMI Output is below 40. Conversely, an SMI Output of above 40 indicates a bullish trend. In SMI, when the current closing price is greater than the Midpoint of High/Low Range, the outcome is above zero. Similarly, when the Current Close is less than the Midpoint of High/Low Range, than SMI is below zero. SMI uses a wide range that can vary from a negative value of -100 to a positive value of +100. In order to smooth the results of SMI, a Moving Average is determined, a.k.a. Stochastic %D.
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
/ * * H = C u r r e n t C l o s e ( H i g h M A X + L o w M I N ) / 2 H S 1 = E x p o n e n t i a l M o v i n g A v e r a g e ( H , 3 ) H S 2 = E x p o n e n t i a l M o v i n g A v e r a g e ( H S 1 , 3 ) D H L 1 = E x p o n e n t i a l M o v i n g A v e r a g e ( H i g h M A X L o w M I N , 3 ) D H L 2 = E x p o n e n t i a l M o v i n g A v e r a g e ( H i g h M A X L o w M I N , 3 ) / 2 S M I T O D A Y = ( H S 2 / D H L 2 ) * 1 0 0 * / 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 ( 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 ) ] i n t e r n a l c l a s s S M I : I n d i c a t o r { p r i v a t e E x p o n e n t i a l M o v i n g A v e r a g e _ e m a D i f f C e n t e r ; p r i v a t e E x p o n e n t i a l M o v i n g A v e r a g e _ e m a D i f f H i g h L o w ; p r i v a t e E x p o n e n t i a l M o v i n g A v e r a g e _ e m a D i f f H i g h L o w 2 ; p r i v a t e E x p o n e n t i a l M o v i n g A v e r a g e _ e m a S m o o t h e d ; p r i v a t e M o v i n g A v e r a g e _ m a S m i ; p r i v a t e I n d i c a t o r D a t a S e r i e s _ i D a t a S e r i e s ; p r i v a t e I n d i c a t o r D a t a S e r i e s _ i D a t a S e r i e s H i g h L o w ; p r i v a t e I n d i c a t o r D a t a S e r i e s _ s m i ; [ P a r a m e t e r ( "