EMA Cross + Divergence strategy (Div. signals by The Divergent)A sample strategy demonstrating the usage of The Divergent divergence indicator and The Divergent Library .
The Divergent is an advanced divergence indicator which you can easily incorporate into your own strategies.
In order to use this strategy (and to use the signals in your own strategy), you need to have the Pro version of The Divergent applied to your chart.
For more information, please see the comments inlined in the code.
Macddivergence
MacD Short and/or Long with Bi-Directional TP and SL This tool allows you to test any variable value for MacD and Signal for going Long or Short with each market direction having customizable values for stop loss and take profit.
For example, sometimes the MacD and Signal values are better with different lengths between Short and Long. You can use this tool to see them overlaid and determine the best settings for going one direction or the other.
This script was preset for use with XBTUSD on the 4 hour time frame. Another example with this in mind, is take profits and stop losses might not work in the Long market direction but going Short does! Without this tool that would be hard to see since typically stop loss and take profit is applied to both directions. I found with this tool that a 20% take profit seems to be a good sweet spot for going short with this strategy.
You can customize which MacD histogram you see by going to the style section and turning off the Short or Long parameters so you can see only 1 histogram at a time if you wish.
If you have any questions, please PM me.
Macd Divergence + MTF EMA MACD Divergence + Multi Time Frame EMA
This Strategy uses 3 indicators: the Macd and two emas in different time frames
The configuration of the strategy is:
Macd standar configuration (12, 26, 9) in 1H resolution
10 periods ema, in 1H resolution
5 periods ema, in 15 minutes resolution
We use the two emas to filter for long and short positions.
If 15 minutes ema is above 1H ema, we look for long positions
If 15 minutes ema is below 1H ema, we look for short positions
We can use an aditional filter using a 100 days ema, so when the 15' and 1H emas are above the daily ema we take long positions
Using this filter improves the strategy
We wait for Macd indicator to form a divergence between histogram and price
If we have a bullish divergence, and 15 minutes ema is above 1H ema, we wait for macd line to cross above signal line and we open a long position
If we have a bearish divergence, and 15 minutes ema is below 1H ema, we wait for macd line to cross below signal line and we open a short position
We close both position after a cross in the oposite direction of macd line and signal line
Also we can configure a Take profit parameter and a trailing stop loss
QuantNomad - EVWMA MACD StrategyPretty simple EVWMA (Elastic Volume Weighted Moving Average ) MACD Strategy.
EVWMA is a quite interesting moving average where the period of the MA is defined from the volume itself.
It incorporates volume information in a natural and logical way. The EVWMA can be looked at as an approximation to the average price paid per share.
As a volume period, you can use sum of the last x bars volumes.
Here are other EVWMA indicators/strategies:
EVWMA indicator:
EVWMA Cross strategy:
MACD, backtest 2015+ only, cut in half and doubledThis is only a slight modification to the existing "MACD Strategy" strategy plugin!
found the default MACD strategy to be lacking, although impressive for its simplicity. I added "year>2014" to the IF buy/sell conditions so it will only backtest from 2015 and beyond ** .
I also had a problem with the standard MACD trading late, per se. To that end I modified the inputs for fast/slow/signal to double. Example: my defaults are 10, 21, 10 so I put 20, 42, 20 in. This has the effect of making a 30min interval the same as 1 hour at 10,21,10. So if you want to backtest at 4hr, you would set your time interval to 2hr on the main chart. This is a handy way to make shorter time periods more useful even regardless of strategy/testing, since you can view 15min with alot less noise but a better response.
Used on BTCCNY OKcoin, with the chart set at 45 min (so really 90min in the strategy) this gave me a percent profitable of 42% and a profit factor of 1.998 on 189 trades.
Personally, I like to set the length/signals to 30,63,30. Meaning you need to triple the time, it allows for much better use of shorter time periods and the backtests are remarkably profitable. (i.e. 15min chart view = 45min on script, 30min= 1.5hr on script)
** If you want more specific time periods you need to try plugging in different bar values: replace "year" with "n" and "2014" with "5500". The bars are based on unix time I believe so you will need to play around with the number for n, with n being the numbers of bars.