Momentum
Click the file above to Download.
NOTE: For easy import into your charts, save to some where that you will be able to remember, for example your computer's desktop. Be sure to save using .alt as the file extension.
Copy to Clipboard Global monMin = 100 Global monMax = -100 Global size = (monMax - monMin) * 0.3 Local fall = 0 Local jump = 0 IF (Mom[0](Close, 12) > monMax) THEN monMax = Mom[0](Close, 12) ENDIF IF (Mom[0](Close, 12) < monMin) THEN monMin = Mom[0](Close, 12) ENDIF // hollow IF (Mom[1](Close, 12) < Mom[2](Close, 12) AND Mom[1](Close, 12) < Mom[3](Close, 12) AND Mom[1](Close, 12) < Mom[4](Close, 12)) THEN IF ( Mom[2](Close, 12) - Mom[1](Close, 12) > size or Mom[3](Close, 12) - Mom[1](Close, 12) > size or Mom[4](Close, 12) - Mom[1](Close, 12) > size) THEN fall = 1 ENDIF ENDIF // peak IF (Mom[1](Close, 12) > Mom[2](Close, 12) AND Mom[1](Close, 12) > Mom[3](Close, 12) AND Mom[1](Close, 12) > Mom[4](Close, 12)) THEN IF ( Mom[1](Close, 12) - Mom[2](Close, 12) > size or Mom[1](Close, 12) - Mom[3](Close, 12) > size or Mom[1](Close, 12) - Mom[4](Close, 12) > size) THEN jump = 1 ENDIF ENDIF //if Momentum formed a hollow and started growing, open a Buy position IF (Mom[0](Close, 12) > Mom[1](Close, 12) AND fall > 0) THEN addBuyEntry ENDIF //if Momentum formed a peak and started falling, open a Sell position IF (Mom[0](Close, 12) < Mom[1](Close, 12) AND jump > 0) THEN addSellEntry ENDIF
Enlarge Chart