The idea is to create a channel based of . When the market breaks out of the channel, and fails to maintain momentum. It is likely the price will fall back toward the center of the channel. This tendency can be exploited in the following manner.
In the chart above, The aqua and maroon (center line) and the blue lines are part of a channel. The middle line is a slow running JMA of the closing prices, with Length = 30 and phase = 0. The upper blue band is constructed by adding 1.5 times of 30-bar ATR ( ) to the center JMA line and the lower blue band by deducting the same amount. There is a grey line running through the data- That is a fast running JMA with length = 5 and phase = 100 representing the price.
The red dots indicate that the the price is going back in the channel and the market is retracting from a failed upward breakout, and the green dots mark when price is retracting from a failed downward breakout. These are places where one might want to enter the trade. The orange dots indicate where price crosses the center line, a reasonable place to take profit from or even exit the trade.
The center line also shows the up or down movements if the setting is ticked. This feature is useful to use when exit a trade. For example, you enter a long position on a green dot signal and the color is maroon. You can wait for 3-5 candles (depending of markets). And if the color doesn’t change it can be an indication that the price is going lower. Here it is possible to switch to a short possible or the opposite apply if you enter on a red dot.
The parameter use in this study is for demonstrating purposes only. This is to show how you can use JMA . Do not trade with real money without thoroughly test the strategy. And always use stop-losses.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.