Sideways Strategy DMI + Bollinger Bands (by Coinrule)Markets don’t always trade in a clear direction. At a closer look, most of the time, they move sideways. Relying on trend-following strategies all the time can thus lead to repeated false signals in such conditions.
However, before you can safely trade sideways, you have to identify the most suitable market conditions.
The main features of such strategies are:
Short-term trades, with quick entries and quick exits
Slightly contrarian and mean-reversionary
Require some indicator that tells you it’s a sideways market
This Sideways DMI + Bollinger Bands strategy incorporates such features to bring you a profitable alternative when the regular trend-following systems stop working.
ENTRY
1. The trading system requires confirmation for a sideways market from the Directional Movement Index (DMI) before you can start opening any trades. For this purpose, the strategy uses the absolute difference between positive and negative DMI, which must be lower than 20.
2. To pick the right moment to buy, the strategy looks at the Bollinger Bands (BB). It enters the trade when the price crosses over the lower BB.
EXIT
The strategy then exits when the move has been exhausted. Generally, in sideways markets, the price should revert lower. The position is closed when the price crosses back down below the upper BB.
The best time frame for this strategy based on our backtest is the 1-hr. Shorter timeframes can also work well on certain coins that are more volatile and trade sideways more often. However, as expected, these exhibit larger volatility in their returns. In general, this approach suits medium timeframes. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange.
You can execute this strategy on your favourite exchange at coinrule.com.
Volatility
UT Bot v5This is an update by request, on someone elses strategy! well more of an edit, but also update from pine v4 to pine v5.
//CREDITS to HPotter for the orginal code. The guy trying to sell this as his own is a scammer lol.
//Edited and converted to @version=5 by SeaSide420 for Paperina
The UT Bot v5 is Movinging average (the MA) vs ATR (the ATR is in the form intended for use as trailing stop loss (ATR_TSL))
Entry logic:
buy = the MA > ATR_TSL and Price > ATR_TSL
sell = the MA < ATR_TSL and Price < ATR_TSL
The Moving average type can be changed in the settings:
options = "SMA", "EMA", "WMA", "HMA"]
the edits i made were:
convert to v5
Add TP and SL
Add Buy only or Sell only option
Add MA type option
Add price source option
Draw MA and ATR_TSL on-chart
DI Crossing Daily Straregy HulkTradingSimple strategy based on crossing DI+ and DI- and Average True Range.
Long entry when DI+ crossover DI-
Short entry when DI+ crossunder DI-
Stop Loss and Take Profits based on Average True Range.
Default values are 1*ATR(14) for stop loss and 2*ATR(14) for Take Profit.
Risk reward 1 to 2 ratio.
Recommended default values, but you can change it if you want.
Recommended timeframe - 1D.
Script was tested on BTCUSDT pair and have a 2.4 profit factor.
Mean Reversion Strategy v2 [KL]Description :
This strategy will enter a position when the following conditions are met:
a) Main signal: When source data (ATR) diverts from its moving average value, and
b) Confirmation: If predicted direction of trend is favorable.
Assumptions :
During periods of high price volatility, ATR diverts from its moving average value. Eventually, ATR should revert. But since just knowing the magnitude of increase/decrease of ATR does not indicate a trend signal, we need to introduce a model to predict the current trend.
In short:
• Trend Prediction : This strategy calculates the expected logarithmic return of the security (the "Drift") and considers prices to be moving in uptrend if the drift curve is upward sloping.
• Assessment of ATR diversion : To determine "yes/no" regarding whether ATR at a given point in time has diverted, this script conducts a two-tailed hypothesis test at each candlestick period. The null hypothesis (H0) is that the fast moving average value should equal the slow moving average value (say, denoted as H0: atr14 == atr28; it is assumed that atr28 is more meaningful for the purpose of describing the current trend because it has a larger sample size). Investopedia has an article summarizing this topic .
Exit Condition :
When trailing stop loss hits.
Previous version :
This strategy is based on Version 1 published back in September . This older version considers +/- one standard deviation to be the critical values relative to average ATR when testing whether ATR has diverted from the mean. This does not take Standard Error ("SE") into account. As a result, the threshold is often too wide and it generates too many entry signals.
BollingerBands Strat + pending order alerts via TradingConnectorSoftware part of algotrading is simpler than you think. TradingView is a great place to do this actually. To present it, I'm publishing each of the default strategies you can find in Pinescript editor's "built-in" list with slight modification - I'm only adding 2 lines of code, which will trigger alerts, ready to be forwarded to your broker via TradingConnector and instantly executed there. Alerts added in this script: 14, 17, 20 and 23.
SCRIPT INCLUDES PENDING ORDERS AND ALERTS! Alert will be sent to MetaTrader when order is triggered, but not yet filled. That means if market conditions change and order does not get filled, it needs to be cancelled as well, and there are alerts for that in the script as well.
How it works:
1. TradingView alert fires.
2. TradingConnector catches it and forwards to MetaTrader4/5 you got from your broker.
3. Trade gets executed inside MetaTrader within 1 second of fired alert.
When configuring alert, make sure to select "alert() function calls only" in CreateAlert popup. One alert per ticker is required.
Adding stop-loss, take-profit, trailing-stop, break-even or executing pending orders is also possible. These topics have been covered in other example posts.
This routing works for Forex, indices, stocks, crypto - anything your broker offers via their MetaTrader4 or 5.
Disclaimer: This concept is presented for educational purposes only. Profitable results of trading this strategy are not guaranteed even if the backtest suggests so. By no means this post can be considered a trading advice. You trade at your own risk.
If you are thinking to execute this particular strategy, make sure to find the instrument, settings and timeframe which you like most. You can do this by your own research only.
TradingGroundhog - Strategy & Fractal V1#-- Public Strategy - No Repaint - Fractals -- Short term
Here I come with another script, more simple than Wavetrend V1. You will love it.
#-- Synopsis --
Another simple idea, on a small time frame (15 min) we buy when the opening price goes below a Bottom fractals and sell when it goes over a Top fractals, but as this script do not use Wavetrends. You should stop by your self to use the script during long lasting downtrends.
I developed the strategy using BTC /EUR 3 MIN BINANCE but it can be applied to many other cryptos, I don't know for forex or others. You can use it for short term (to a month of uptrend) and automated trading.
#-- Graph reading --
And now, how to read it ?
Fractals:
Yellow Flags occur when the opening price goes below a Bottom fractal , it means Buy.
White Flags appear when the opening price goes over a Top fractal , it means Sell.
#-- Parameters --
*** Parameters have been intensively optimized using 10 cryptocurrency markets in order to have potent efficiency for each of them. I would recommend to only change the Can Be touch parameter. For the others, I don't recommend any modifications. The idea behind the script is to be able to switch between markets without having to optimize parameters, less work, easy to target active crypto and therefor limit the risks. ***
Can be touch :
'Filter fractals' : Activate or Disable the filtering fractal operation. If Enable, buy during less risky periods. (Activate is often better)
Can be touch but not necessary :
'VolumeMA' : The Volume corrector used by the fractals
'Extreme window' : The number of price individuals to look for if we want to remove extreme fractals.
Not to touch :
'Long Sop Loss (%)' : The minimal difference of price between a Fractal bottom and the opening price to buy.
#-- Time frame --
Should be used with the following time frames depending on the necessity:
1 MIN
3 MIN (Preferred with the parameters set)
5 MIN
#-- Last words --
The script can be set up to send Tradingview signals to 3comma just by adding comment = " " in strategy.close_all() and strategy.entry().
Good trades !
Disclaimer (As it should always be one to any script)
***
This script is intended for and only to be used for personal purposes only. No such information provided by it constitutes advice or a recommendation for any investment or trading strategy for any specific person. There is no guarantee presented or implied as to the accuracy of specific forecasts, projections, or predictive statements offered by the script. Users of the script agree that its original developer does not take responsibility for any of your investment decisions. Please seek professional advice before trading.
***
# Here are the results from the 20rst of September 2021 with 100% of equity on the BTC /EUR 3 Min and with a capital of 10 000 EUR. So almost, one month.
# As I saw, it goes from +30% to more than +160% (the great SHIB) depending on the selected crypto. It may be negative if you spot a downtrend.
TradingGroundhog - Strategy & Wavetrend V2#-- Public Strategy - No Repaint - Fractals - Wavetrend --
Here I come with another script, a nice and simple strategy based on fractals and Wavetrends.
#-- Synopsis --
A simple idea, on a small time frame (15 min) we buy when the opening price goes below a Bottom fractals and sell when it goes over a Top fractals, but in order to avoid bad and evil downtrends, we use Wavetrends based on a Daily time frame. From it, Tops and Bottoms are extracted. If the opening price goes above Wavetrend Tops, no trades will be conducted during the day. If the price goes below Wavetrend bottoms, no trades will be executed from 1 to N days, until a new Wavetrend bottom is generated.
I developed the strategy using BTC /EUR 15 MIN BINANCE but it can be applied to many other cryptos, I don't know for forex or others. You can use it for long term and automated trading, I implemented the Wavetrend indicator to do so, or for short term if you have spot a long coming uptrend. Test it, look at its profit and long or short period on your crypto of choice.
#-- Graph reading --
And now, how to read it ?
Wavetrends:
Red Backgrounds are associated to No Trade periods. These periods occur when the price goes below a Wavetrend bottom or above a Wavetrend Top. They are here to limit the loss.
Blue Gradient lines represent the past Tops. For each bar, only the increasing values of the Wavetrend tops are acquired. Going from light to dark blue based on the age of the Tops. Thus, if on line goes from dark to light, this means the price is approaching a previous Wavetrend top. In the opposite, if it darken, thus the price say 'buy buy' and go dropping.
Yellow Gradient lines represent the past Bottoms. They are based on the same principe that the blue lines.
Fractals:
Yellow Flags occur when the opening price goes below a Bottom fractal , it means Buy.
White Flags appear when the opening price goes over a Top fractal , it means Sell.
#-- Parameters --
*** Parameters have been intensively optimized using 10 cryptocurrency markets in order to have potent efficiency for each of them. I would recommend to only change the Can Be touch parameter. For the others, I don't recommend any modifications. The idea behind the script is to be able to switch between markets without having to optimize parameters, less work, easy to target active crypto and therefor limit the risks. ***
Can be touch :
'Combined Smoothness' : The number of open individuals used by the Wavetrend. (6 or 9, often 9 is better but with less volatile crypto it will be 6)
'Filter fractals' : Activate or Disable the filtering fractal operation. If Enable, buy during less risky periods. (Disable is often better)
Can be touch but not necessary :
'VolumeMA' : The Volume corrector used by the fractals
'Extreme window' : The number of price individuals to look for if we want to remove extreme fractals.
Not to touch :
'Limit_candle to look on' : Number of candles to use to compute the Wavetrend Tops and Bottoms.
'Length top bottom drawn' : Size of the lines
'Long Sop Loss (%)' : The minimal difference of price between a Fractal bottom and the opening price to buy.
#-- Time frame --
Should be used with the following time frames depending on the necessity:
1 MIN
3 MIN (Interesting for short term profit, may need some parameter ajustements)
5 MIN
15 MIN (Preferred for long term profit, the script was developed on it)
#-- Last words --
The script can be set up to send Tradingview signals to 3comma just by adding comment = " " in strategy.close_all() and strategy.entry().
Good trades !
Disclaimer (As it should always be one to any script)
***
This script is intended for and only to be used for personal purposes only. No such information provided by it constitutes advice or a recommendation for any investment or trading strategy for any specific person. There is no guarantee presented or implied as to the accuracy of specific forecasts, projections, or predictive statements offered by the script. Users of the script agree that its original developer does not take responsibility for any of your investment decisions. Please seek professional advice before trading.
***
# Here are the results from the 1rst of July 2021 with 100% of equity on the BTC /EUR 15 Min and with a capital of 1 000 EUR.
# As I saw, it goes from +20% to more than +100% depending on the selected crypto. Sometimes it's negative but it's quite rare on crypto using the EUR.
Simple Ema_ATR Strategy HulkTradingSimple EMA strategy, based on ema55+ema21 and ATR(Average True Range) and it enters a deal from ema55 when the other entry conditions are met
Basically long and short conditions
If long:
1) close must be less than open (because we are searching for a pullback)
2) emaFast(21) must be bigger than emaSlow(55) - for a trend detection
3) Difference between emaFast and emaSlow must be greater than ATR(14) - for excluding flat
For short conditions are opposite
Stop levels and take profits, based on ATR multiplier.
You can change it in input field.
I recommended values between 1 and 4, not more.
This strategy was tested on pairs BTCUSDT and ETHUSDT and have a nice results.
Trend Strategy by zdmreThis Strategy is a trend following indicator. It is plotted on price and the current trend can be determined by its placement vis-a-vis price. It is constructed with just three parameters: Period, Multiplier and Entry/Exit Point with Superformula.
The default parameters are 14 for Average True Range (ATR) and 4 for its multiplier. The average true range (ATR) plays a key role in ‘Trend’ as the indicator uses ATR to compute its value and it signals the degree of price volatility. You should note that any changes to these numbers can affect the use of the Trend indicator.
While you using this indicator, you should not avoid putting your stop loss.
For a long position, you can put stop loss right at the red indicator line. For a short position, you can put it at the green indicator line. You can insert your own settings as well.
Using Trend Strategy along with a stop loss pattern is the best way for earning the best wealth in trading.
There is no best setting for any trading indicator.
Scalping Trading System bot Crypto and StocksThis is a trend trading strategy scalping bot that can work with any type of market. However I concluded my tests so far with Crypto, Stocks and Forex, and with optimizations always could be found some profitable settings.
Indicators
SImple Moving Average
Exponential Moving Average
Keltner Channels
MACD Histogram
Stochastics
Rules for entry
long= Close of the candle bigger than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is negative and stochastic is below 50.
short= Close of the candle smaller than both moving averages and close of the candle is between the top and bot levels from Keltner. At the same time the macd histogram is positive and stochastic is above 50.
Rules for exit
We exit when we meet an opposite reverse order.
This strategy has no risk management inside, so use it with caution !
Juicy TrendThis script is simple.
It uses EMA and HMA crosses to find entries and exits.
There is an option for sourcing Heikin Ashi based entries/exits.
There is an option for Stop Loss percentage.
It is made for finding Long entries on the 45min chart.
You can optimize the signals by adjusting the moving average lengths.
The default settings are for BTC/USDT 45min.
Suggestion, reduce the Stop Loss percentage for smaller / more volatile assets.
BBPBΔ(OBV-PVT)BB - Time Series Decomposition & Volume WeightedThis is an indicator that shows 5 different points of information:
#1 The Trendline is uses a time-series decomposition to remove noise and seasonality data to provide a trendline without using moving averages. This is then further processed by a custom VWAP block that weights it based on the time frame you're currently using.
#2 BB%B - This is the blue histogram that's partially transparent. This is used to find when a security is overbought or oversold.
#3 BB%B of the Δ(OBV-PVT). This is the green histogram. We took the OBV and subtracted the PVT from it, then we found the delta of that compared to the previous candle. This output a line, which we wrapped in bollinger bands to find the BB%B of this line. This line is represented as a histogram, for visual clarity.
#4 Long and Short Indicators: Long is represented by a green dot, and short is represented by a red dot.
#5 Zones - there are multiple zones, which are used to identify overbought and oversold zones.
How to use the indicator:
Simple way: Long on green dot, Short on red dot. Use stop losses and take profits.
Slightly More Complex: Same as above, but also close out longs, when the green histogram drops but the blue does not. As this means price action hasn't caught up with volume. Use stop losses and take profits.
Full Usage: Long only when both the green, blue and yellow lines are below 0, and sell when the blue or green histogram rises above 1. Perform the opposite for the shorting. Ignore the dots if you use this method, they are for simple reference points til you get used to this indicator. Use stop losses and take profits.
Volatility Stop Strategy (by Coinrule)Traders often use the volatility stop to protect trades dynamically, adjusting the stop price gradually based on the asset's volatility.
Just like the volatility stop is a great way to capture trend reversals on the downside, the opposite applies as well. Therefore, another useful application of the volatility stop is to add it to a trading system to signal potential trend reversals to catch a good buy opportunity.
ENTRY
- When the price crosses above the Volatility Stop
EXIT
- When the price crosses below the Volatility Stop
For this strategy, the Volatility stop's multiplier is set to 3 to allow more flexibility to the trade. The strategy is designed for medium-term trades.
Based on the backtest result from a sample of crypto trading pairs, the most profitable time frame is the 2-hr.
The strategy works well with both crypto-to-crypto and crypto-to-fiat pairs. To make results more realistic, a trading fee of 0.1% is added to the script. The fee is aligned to the base fee applied on Binance.
Bollinger band & Volume based strategy V2this script is upgraded version of previous one the major change is deleted script which find a highest price after entry the last of strategy is same.
If current volume is above daily average volume, and three bollinger band`s Standard Deviation, 1 and 1.5 and 2 if the current lowest price is bigger then 1 stdev and current closed is bigger then 1.5 stdev and the last,highest price is above 2.0 stdev, it defined current market is bullish and had momentum.
and the Short will entered when ma60 and ma120 is undercrossed it work as prevent current price is way lower then entry price.
**this script is working in 15min Only in BTC market or USDT**
** basic equity setting is 500$, set your own**
**if you will use this in real-trade,plz comment the result to me**
Ps: i wanna know why my script is only working well in 15 min tick, anyone who has similar phenomenon or if you had a answer about it, please comment me.
Kaufman's Efficiency Ratio Strategy [KL]I recently published an indicator called "Kaufman's Efficiency Ratio Indicator". In the description of that script, I hypothesized about how the Efficiency Ratio could be applied to identify bullish moves in instances where price had already gone up steeply, but rests for a while, allowing for entry in expectation that price will continually rise. I decided to test out this idea with Pinescript.
About Kaufman's Efficiency Ratio ("ER")
ER was developed by a systematic trader by the name of Perry J. Kaufman.
Formula
The formula is:
= A divided by B,
where:
A = Current closing price minus the closing price at the start of the lookback period
B = Sum of differences between closing prices (in absolute terms) of consecutive bars over the lookback period
How this strategy enters a trade (Long):
- code: entry_signal_long = ER > 0 and ER_is_mid
- meaning: when ER is positive, strategy assumes price has risen. Usually ER value begins high (red), and unless it is a false move, then it should stay positive. This strategy will patiently wait until ER drops to medium (yellow), and then place a trade.
- how low/medium/high is dynamically determined: Refer to the description of my other script("Kaufman's Efficiency Ratio Indicator") for details. Trying to keep this as short as possible.
How this strategy exits a trade (Long):
- when price hits stop limit; stop limit is based on low of bars, trails upward based on ATR
- included a feature called "tightening TSL", which tries to reduce the stop-buffer during periods of high volatility implied by ER (very experimental, opening the floor for suggestions on how this can be improved)
VCP pivot buyIt will buy the breakout of the pivot in a bullish trend which is defined by the Mark Minervini stage 2 template
Set the stop loss% and Target% in your favor ( recommend the stoploss% as the low percentile atrp )
It helps indicate the contraction point so that we can have a low-risk entry of a buy point.
It followed the strategy of Mark Minervini.
changing the lookback period input to change the percentile
changing the Pivot Length to decide how many bars you would consider as a pivot
changing the Close range to decide in how much percentage does the close range you would consider as a pivot
The percentile rank is represented in the colour of the background, you can alter how low you want to set to indicate lowering volatility.
The blue line shows the percentage range in ( pivot length) days/bars
The coloured background shows the signal of pivot point forming
Linear SSL ShortThis script consist of two parts: linear SSL and DEMA. The difference between original SSL and current is that it calculated by linear regression. The logic is simple: when SSL "crossunder" and DEMA is above the price - we get short signal. When price became above DEMA and SSL "crossover" - close short.
Bolinger strategy v1 openFind lows based on divergence on bollinger bands .
Works great on stocks and index, no success on forex.
Different stock/index requires different values.
Exit is not perfect, often on the safer side.
Example settings: NASDAQ:OMXS30, 30m: 25 0.452 0.42 0.453 2 62 20
Lower bbrower = buys harder dips, too low will cause buy during fall.
Higher bbrhigher = buys on lower dips
One of my first scripts, so code is not pretty
MA&AOThat is quit simple strategy, which combines only two indicators: AO and MA. The logic of trades is also clear, when AO is bullish; slow ma is under the close price; fast ma > slow ma - buy.
Moving Average Band - Taylor V1A Very Simple Strategy From Moving Average
- Price Breakout Upper Band = Long
- Price Breakout Lower Band = Short
Moving Average Type = Able to Change RMA, EMA, SMA, WMA
Moving Average Period = Able to Change
Upper Band & Lower Band Gap = Able to Change
With Stop Lose & Take Profit = Able to Change
Bagheri IG Ether v2In this version, the winning ratio has been decreased, but the Risk to Reward Ratio (RRR) has been set to be better than the previous version.
This is a technical trading strategy for Ethereum ( BINANCE:ETHUSDT ). We built and developed it on MetaEditor and optimized it with MetaTrader optimizer.
The main indicators are Donchian Channel, Oscillator of ROC , Bears Power, Balance of Power , and Simple Moving Average ( SMA ). Default values in the input panel are the best combination of these indicators, but you can change any of them and try it for better results.
Please notice that this strategy has been optimized on the 1-minute chart of Ethereum .
For each position, you can see the Take Profit (TP) and Stop Loss (SL) levels. Also, you can find the values of mentioned TP and SL in points from the input panel of the script.
Attention: The price of Ethereum has 2 decimal places.
Therefore, 3000 points for TP means 30 USDT for trading 1 BINANCE:ETHUSDT .
Take Profit On Trend (by BHD_Trade_Bot)The purpose of strategy is to detect long-term uptrend and short-term downtrend so that you can easy to take profit.
The strategy also using BHD unit to detect how big you win and lose, so that you can use this strategy for all coins without worry about it have different percentage of price change.
ENTRY
The buy order is placed on assets that have long-term uptrend and short-term downtrend:
- Long-term uptrend condition: ema200 is going up (rsi200 greater than 51)
- Short-term downtrend condition: 2 last candles are down price (use candlestick for less delay)
CLOSE
The sell order is placed when take profit or stop loss:
- Take profit: price increase 1 BHD unit
- Stop loss: price decrease 2 BHD units
The strategy use $15 and trading fee is 0.1% for each order. So that, in the real-life, if you are using trade bot, it will need $1500 for trading 100 coins at the same time.
Pro tip : The 1-hour time frame for altcoin/USDT has the best results on average.
%-[Guz] Vortex Indicator Custom// Custom Vortex Strategy (backtester)
// Custom version of the Vortex indicators that adds many features:
// -Triggers trades after a threshold is reached instead of the normal vortex lines cross (once the difference between the 2 lines is important enough)
// -Smooths the Vortex lines with an EMA
// -Adds Take Profit and Stop Loss selection
// -Adds the possibility to go Long only, Short only or both of them
// ! notice that it uses 10% position size and 0.04% trade fee, found on some crypto exchanges futures contracts
// Allows testing leverage with position size modification (values above 100% position size, to be done with caution)
// Not an investment advice