Momentum Strategy (BTC/USDT; 1h) - MACD (with source code)Good morning traders.
It's been a while from my last publication of a strategy and today I want to share with you this small piece of script that showed quite interesting result across bitcoin and other altcoins.
The macd indicator is an indicator built on the difference between a fast moving average and a slow moving average: this difference is generally plottted with a blue line while the orange line is simply a moving average computed on this difference.
Usually this indicator is used in technical analysis for getting signals of buy and sell respectively when the macd crosses above or under its moving average: it means that the distance of the fast moving average (the most responsive one) from the slower one is getting lower than what it-used-to-be in the period considered: this could anticipate a cross of the two moving averages and you want to anticipate this potential trend reversal by opening a long position
Of course the workflow is specularly the same for opening short positions (or closing long positions)
What this strategy does is simply considering the moving average computed on macd and applying a linear regression on it: in this way, even though the signal can be sligthly delayed, you reduce noise plotting a smooth curve.
Then, it simply checks the maximums and the minimums of this curve detecting whenever the changes of the values start to be negative or positive, so it opens a short position (closes long) on the maximum on this curve and it opens a long position (closes short) on the minimum.
Of course, I set an option for using this strategy in a conventional way working on the crosses between macd and its moving average. Alternatively you can use this workflow if you prefer.
In conclusion, you can use a tons of moving averages: I made a function in pine in order to allw you to use any moving average you want for the two moving averages on which the macd is based or for the moving average computed on the macd
PLEASE, BE AWARE THAT THIS TRADING STRATEGY DOES NOT GUARANTEE ANY KIND OF SUCCESS IN ADVANCE. YOU ARE THE ONE AND ONLY RESPONSIBLE OF YOUR OWN DECISIONS, I DON'T TAKE ANY RESPONSIBILITY ASSOCIATED WITH THEM. IF YOU RUN THIS STRATEGY YOU ACCEPT THE POSSIBILITY OF LOOSING MONEY, ALL OF MY PUBBLICATIONS ARE SUPPOSED TO BE JUST FOR EDUCATIONAL PURPOSES.
IT IS AT YOUR OWN RISK WHETHER TO USE IT OR NOT
But if you make money out of this, please consider to buy me a beer 😜
Happy Trading!
Macd-v
[KL] BOLL + MACD Strategy v2 (published)This strategy will look for opportunities when price touches the lower Bollinger band, then enters Long when it anticipates a MACD crossover signal.
Setup: on 1-day chart interval
Exits when either (a) hitting trailing stop loss, or (b) meeting risk-to-reward, if defined by user.
ADX Momentum cross + MacD + HH LL + Buy/Sell Signals and alerts Hello, This is the first indicator I have made and would like to contribute to the community.
This strategy came from trying to replicate a previous ADX Cross Indicator that I loved on MT4 which I used successfully on EUR/USD on high and low time frames. Through the process of trying to replicate it I failed, I decided to take what I had written so far and create my own ADX cross strategy using the combination of 3 ADX's, their lag. Then also using Higher highs and lower lows with the MacD to further filter the signals.
There are two buy and two sell conditions , the difference between these are just the order in which the ADX crossing determines the entry. The MacD and higher highs and lower lows are the same for filtering the signal.
You can change the look back for HH and LL look back range, along with the DI Length & ADX Smoothing for all ADX's. The lag used for either the buy or sell strategy with the Lag_Buy/Lag_Sell inputs. Lag_mid setting will affect all 4 conditions.
From testing and based on the ADX cross logic you should follow this structure when changing the inputs for:
DI Length: Lowest DI value (I.E. 1)
DI Lengtha: Middle DI value (I.E. 2)
DI Lengthb: Highest DI value (I.E. 3)
ADX Smoothing: Lowest Smoothing value (I.E. 1)
ADX Smoothinga: Middle Smoothing value (I.E. 2)
ADX Smoothingb: Highest Smoothing value (I.E. 3)
I tested this on the EUR/USD, but mainly I have been using it on BTC/USDT(binance) and BTC/USDT Perpetual futures(binance) with the 5 minute chart. I suggest playing around with the settings depending on the Symbol and timeframe you use because the default settings are what I last found to be optimal for my self on the 5min BTC/USDT Perpetual futures(binance) chart.
A good starting point I found when using the indicator on other charts is to use the below values:
DI Length: 7
DI Lengtha: 14
DI Lengthb: 21
ADX Smoothing: 7
ADX Smoothinga: 14
ADX Smoothingb: 21
If you have any questions, suggestions, or requests for this indicator feel free contact me. You can either comment on here or Message me
If you like this indicator please like and comment where you found it useful.
NeverBot Basic Momentum ShiftNeverBots Basic Momentum Shift Script
This script is a basic up/down indicator to tell you which way momentum has shifted, this should be used as part of another system to add confluence to your already existing long or short thesis. Uses a simple algebraic equation to define the momentum and when up or down has shifted above/below the other.
Combine this with an MA strategy to get entries for a good hit rate. Typically used for intraday but you can still use this as an indicator for higher time frames.
Crypto is very volatile and momentum can shift within a few minutes which is why you will see some failed signals, but typically it works very well for catching the big moves in crypto as momentum becomes very strong due to FOMO etc..
Stochastic MTF IICombines Stochastics, RSI and MACD Histogram to give a complete picture of the momentum.
The main two lines are stochastics from the higher time frame(current time frame* 4).
The red columns are stochastic of macd histogram.
The green histogram is the stochastic rsi of price.
The dots at 50 line is the correlation between price and macd+rsi combo.
Awesome Oscillator & MACD Cross TacticOscillator for Tradingview based on MACD and Awesome Oscillator. This oscillator is designed to identify potential local growth or decline in prices as part of a trend movement.
For some ridiculous reason I am not allowed to attach screenshots of graphs and links on TradingView, so I hope that you will find my detailed instructions on my github page: github.com/samgozman/AO-MACD-cross-tradingview
[SK] Double MACDThe Double MACD indicator is precisely two different MACD indicators plotted on the same axis for precise visual correlation between each other.
This correlation provides more information than a single regular MACD by allowing you to compare the signals of a shorter timeframe to the default or longer timeframe,
showing the strength of the change in momentum and the peak of the momentum between both configurations.
The indicator has cloud options by default if you toggle on the MACD / Signal lines for better readability.
The cloud will change color to the line on top of it's set. This is to help you not get lost in the 4 different lines.
Customize the indicator to your preference and make it your own
If you'd like a candle like visualization, change the short MACD plot style to a histogram.
For a beautiful double bars style, select bars on both configurations and set the transparency to 30 - 40
For a dynamic moving average style, go with the line plot style ( default )
All MACD/Signal lines are toggled off by default, toggle them on in the inputs section.
On the styles panel, you can turn off the cloud fills or the lines.
Change all the colors you'd like!
MACD + RSIThis MACD indicator is equipped with RSI strength signal.
Purple circles will display on 0 line when RSI is above 50%.
The MACD signal lines and RSI strength signal can be changed based on your own preference.
Preset value for MACD is 18, 16 & 11.
Preset value for RSI strength signal is 50%.
Alert for MACD Golden Cross and MACD Death Cross are also included.
Buy if MACD Golden Cross occurred and RSI strength signal appeared.
Sell if RSI strength signal disappeared.
Notes: This indicator is a secondary indicator. Therefore, you shouldn't used it solely for trading.
SPY Ninja Oscillator
SPY Ninja Oscillator correlates the true strength index exponential moving averages of SPY (green) and VIX (red) together. In doing so we can determine the start of trend shifts via SPY / VIX convergence in addition to crossover, with potential market entries and exits represented by the vertical green and red bars.
MACD and RSI have been scaled proportionally to the oscillator range ( for rsi: (rsi-50)*. 01 , and for macd: macd /3) and when overlaid and used in conjunction with the market vertical entry and exit signals, potential trend prediction becomes much more apparent.
Stochastic with MACD filter + SL/TP + AlertsLong Arrow : close of the candle is above ema + Stochastic is oversold + MACD is below 0 + Stochastic cross up
Short Arrow : close of candle is below ema + Stochastic is overbought + MACD is above 0 + Stochastic cross down
Also added SL, 1:1 and TP where SL can be varied by ATR value and TP is set to 2:1 RR but it can be varied too.
It is not meant to take every single trade even though that might already be profitable.
For higher winrate look for the higher timeframe trend for example when trading the 15min look if the Daily 8ema is going up or down.
Also only take trades when there is either a hidden divergence on RSI or a smaller normal divergence.
The I take the normal divergenes alo when there is no higher high like an M or lower low for longs like a W these tend to work out pretty good too.
Alerts are in it too.
Have Fun :)
MacD Custom Indicator (updated to version 4)I updated existing script “ MacD Custom Indicator-Multiple Time Frame+All Available Options! ” originally created by ChrisMoody to Pine Script 4. version, so you can use it within your own strategy for algotrading or trading bots.
[FTA] Logarithmic MACD with Regular and Hidden DivergencesThis is a highly stable, volatility adaptive, Moving Average Convergence Divergence (MACD) that uses a modified calculation based on improved logarithmic measurements of the momentum.
1- This MACD provides the trader with most accurate detection of divergences, both regular and hidden ones, and shows them on the MACD Histogram.
2- Furthermore, the MACD/Signal divergences are also easily detectable (unlike the regular MACD which often does not provide accurate divergences; see the screenshot for comparison).
3- Finally, due to some different calculation methods, this MACD, unlike the regular MACD, is highly stable in higher time frames even in the most volatile markets (such as BTC, ETH, ADA, etc...) and thus can easily be utilized for the market prediction state in the crypto (see the screenshot for comparison).
Use it and let me know what you think about it in comparison to regular MACD!
Customizable Percentage Price Oscillator (PPO)The PPO is basically the MACD but in percentage terms. This is better for comparing momentum across different securities.
This script is a standard PPO but with many options for customization. You can set the moving average type of the signal and the oscillator lines separately. You can also weight any moving average of the PPO by volume.
Supported Types of MA:
SMA
EMA
ALMA
HMA
WMA
Personally, I believe weighting by volume is helpful across markets but especially helpful for equities. I like to use 3,10,16 settings similar to Linda Raschke but with EMA instead of SMA. This indicator is especially useful for signaling trend continuation and generating exit signals. For entries, I believe this indicator should not be blindly followed and works better when combined with a trend or price action signal.
If there are requests for more types of moving average to be used with the PPO, I would be down to implement them, but I believe most moving averages are pretty similar.
MACD BandsThis is MACD indicator on the price chart. You can read the same information as the original MACD but much more.
You can use it the same way as MACD but it won't use any space below your chart. Also you can use signal line and cloud as trend confirmation: e.g. if above them it can be a stronger uptrend.
The signal line (yellow by default) can be used as a support-resistance line.
If teal line is above maroon line, MACD is positive, otherwise it is negative
MACD value is the width of the cloud
Cloud color is green when MACD histogram is positive, red if negative
You can change MA types
MACD and histogram values can be seen in Data Window
Jim's MACDMACD Buy/Sell Strategy
Filters bearish crossovers above the 0 line and bullish crossovers below.
Uses 34 ema to further filter the trades and take only longs above and only shorts below.
Apply at least 2:1 risk to reward ratio to account for losing trades.
Trade at own risk!
Dominant Cycle Adaptive MACDThis Indicator is based on classic MACD but with an exceptional smoothing.
This smoothing eliminates the noise of the classic MACD as you see in the Chart
Adaptive MACD is compiled using with two adaptive moving averages, one adaptive to the dominant cycle and the other adaptive to twice the dominant cycle. As the basic behind the MACD is the difference of two moving averages we cannot find much difference between the conventional MACD (12, 26) and the adaptive MACD. However the adaptive MACD is less prone for less whipsaws and it catches the trends very well at the same time the catches the turning points in time. The Adaptive MACD is definite one notch better than the conventional MACD.
Dominant Cycle Period is calculated using Ehler's Method {Mentioned in the code}
This is how the Adaptiveness Impacts the Price Chart
1. (12, 26 EMA) VS Adaptive Dominant Cycle EMA
2. See how the Adaptive Lengths {both FastLength and SlowLength changes with time!}
Enjoy!
JamesCart's Feigenbaum Constant/Rate Of Change indicatorThis is an indicator that compares the rate of change as a proportion to the Feigenbaum Constant (The black line). The green line is a positive divergence from the rate of change, the red is a negative divergence from the rate of change. When the Red line is on top and the green line is on the bottom, then that is a bearish trend. When the Green is on top and the red is on bottom, that is a bullish trend. The black line also helps indicate a general bullish or bearish trend based on how it moves.
When the lines "open up" that means a trend is beginning, when the lines close that means the trend is ending. This indicator is a powerful leading indicator and needs sensitive eyes. Every small movement needs to be given consideration.
Volume Weighted MACD with Named PlotsLiterally just copied VWMACD but named the plot lines to make setting alerts more clear.
The WWG Plan Indicator V2█ OVERALL
This indicator was specifically created for the Walsh Wealth Group.
In short it is a fusion of some of the most basic and widely used indicators to show overbought patterns and trend reversals.
Its best usage is with LTF scalping and agressive profit taking but can also be used to find HTF dips and buy-zones.
█ FEATURES
Buy Signal (Buy):
Printed only with all confirmations triggered
Small Buy Signal (B1 & B2)
Printed if some of the confirmations are triggered and can be treated as DCA entries or for further
confirmation with other indicators and basic TA.
Crayons (Color Bars):
Blue: RSI is oversold
Olive: RSI and Stoch RSI are oversold
Yellow: RSI, Stoch RSI are oversold and lower Bollinger Bands are crossed by Low
Orange: RSI, Stoch RSI and CCI are oversold
Trailing SL:
If activated in the config, a trailing SL can be displayed on the chart based on ATR.
█ SETTINGS
The underlying indicators used are RSI, Stoch RSI, Bollinger Bands, MACD and CCI.
All possible configs can be changed in the config settings.
█ GENERAL INFORMATION
Depending on the settings, the indicator performance will be highly affected.
This indicator is only displaying highly oversold areas and events of trend reversal it is not a *God*-Signal and will print false positives.
█ ALERTS
An alert for the main buy-signal is implemented and can be used via the TV alert functionality.
MACD 50x Leveraged Strategy Real Equity Simulation Hello, I wrote this script to merge the two scripts I shared before.
The aim here is to see the real value of the state of the capital as a result of leveraged transactions and to combine both long and short directions.
Scripts :
MACD Long 50x Leverage Strategy :
MACD Short 50x Leverage Strategy :
The parameters have not changed so they are the same as the previous two scripts:
Adding margin: Forbidden or not specified. (Add Margin : No)
Position Size : %1 (0.01) (For each trade)
Stop-Loss : %2 (For each trade)
Long : Crossover(delta,0) (Standard MACD)
Long Exit : Long Stop Level or Short Entry
(In the case of Long Stop, all trades are closed and no positions are opened in short direction.)
Short : Crossunder(delta,0) (Standard MACD)
Short Exit : Short Stop or Long Entry
(In the case of Short Stop, all trades are closed and no positions are opened in the long direction.)
NOTE :
This is a simulation made using standard parameters, showing the state of the balance in very simple rules with leveraged transactions only.
The nice thing here is the direct observation of the results by making modifications on the strategy parameters.
Regards.