Last active
September 19, 2021 10:20
-
-
Save marketcalls/3f5316300498f68e1d58 to your computer and use it in GitHub Desktop.
Stochastic Momentum Oscillator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Modified Stochastic Momentum Oscillator | |
//Coded by Rajandran R | |
//Author - www.marketcalls.in | |
_SECTION_BEGIN("Stochastic Momentum Oscillator"); | |
LookBack1 = Param("Lookback1", 24, 2, 100 ); | |
LookBack2 = Param("Lookback2", 100, 2, 100 ); | |
Smooth1 = Param("Smooth 1", 3, 1, 100 ); | |
Smooth2 = Param("Smooth 2", 10, 1, 100 ); | |
P = (H+L+C)/3; | |
HH1 = HHV( P, LookBack1 ); | |
LL1 = LLV( P, LookBack1 ); | |
HH2 = HHV( P, LookBack2 ); | |
LL2 = LLV( P, LookBack2 ); | |
StoMom = 100 * MA( EMA( C - 0.5 * ( HH1 + LL1 ), Smooth1 ), Smooth2 ) / | |
( 0.5 * MA( EMA( HH2 - LL2, Smooth1 ), Smooth2 ) ); | |
icolor = IIf(StoMom>0 AND StoMom>Ref(StoMom,-1),colorGreen,IIf(StoMom>0 AND StoMom<Ref(StoMom,-1),colorBlue,IIf(StoMom<0 AND StoMom<Ref(StoMom,-1), | |
colorRed,colorYellow))); | |
Plot(StoMom, _DEFAULT_NAME(), icolor, styleHistogram | stylethick ); | |
_SECTION_END(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment