ATR Trailing Stoploss StrategyI am sharing the strategy version of the indicator used before. It is very simple to use.
These are the settings I use, you can change, test and use as you wish.
Atr Period 5
Highest High Period 10
Multiplier 2.5
It can generate more signals in shorter time frames.
The success rate will be higher in longer time frames.
Volatility
SuperTrend STRATEGYSTRATEGY version of SuperTrend Indicator:
SuperTrend is one of the most common ATR based trailing stop indicators.
In this version you can change the ATR calculation method from the settings. Default method is RMA, when the alternative method is SMA .
The indicator is easy to use and gives an accurate reading about an ongoing trend. It is constructed with two parameters, namely period and multiplier. The default values used while constructing a superindicator are 10 for average true range or trading period and three for its multiplier.
The average true range (ATR) plays an important role in 'Supertrend' as the indicator uses ATR to calculate its value. The ATR indicator signals the degree of price volatility .
The buy and sell signals are generated when the indicator starts plotting either on top of the closing price or below the closing price. A buy signal is generated when the ‘Supertrend’ closes above the price and a sell signal is generated when it closes below the closing price.
It also suggests that the trend is shifting from descending mode to ascending mode. Contrary to this, when a ‘Supertrend’ closes above the price, it generates a sell signal as the colour of the indicator changes into red.
A ‘Supertrend’ indicator can be used on equities, futures or forex, or even crypto markets and also on daily, weekly and hourly charts as well, but generally, it fails in a sideways-moving market.
Source function added to use the indicator as the ATR Trailing Stop indicator.
Just change source type hl2 to close.
different variations might be useful.
Simple and efficient PSAR swing strategyThis is a strategy build inside tradingview, which I found it works great with swing/position trading.
It works based on parabolic sar indicator, when indicator is below the candle, is an uptrend and when its its above is a downtrend.
At the same time it's very nice, because it has a sort of stop loss which is dynamic, because it triggers when candle crosses with indicator, so you dont have to worry about stop loss or take profit .
The key here of course, is going to be the risk management, if you want to success with it, never trade more than 2% of you capital, and if you want you can always apply a rule inside the code to close all position if x % amount of equity was going down, although I recommend have patience and let the system do its job.
I recommend this strategy to be used with charts like 1 day or 1 week. If you need and want I can convert it to an indicator that uses alerts (although with strategy as well can be made to send alerts).
PS. When you add this strategy on chart, inside is has different versions, if you use first version(1), it uses the system I explain above. If you use the last one, its based on risk management when the stop loss is the difference between psar and the candle, but it still needs some adjustments to make.
Overall first one is atm much more profitable, but I believe that the version with risk management can be much better, but it need much more adjustments to make which I dont have the time at the moment for it.
Enjoy it .
Buurmans TutorialA little Script as part of a Tutorial using Monday as entries and Friday as exits/shorts, with option to Long-Only and a rudimentary Stoploss.
outlined in detail here
can't find a better fitting Category, so bear with me
Trend Indicator with BUY SELL signalsThe Script can be used to identify the main trend and take BUY/SELL decisions in the lower time frames.
The tool can be applied as follows
1) Apply the tool your favorite chart
2) Select the main trend.
3) Go to lower time frames to check the BUY/SELL signals. Example: If the selected main trend is 4 hrs then go to time frames below 4 hrs to find the entry and exit positions.
Feel free to reach out to me if you need any further information
Bollinger Bands Breakout StrategyBollinger Bands Breakout Strategy is the strategy version of Bollinger Bands Filter study version, which can be found under my scripts page. The strategy goes long when price closes above the upper band and goes short signal when price closes below the lower band.
Bollinger Bands is a classic indicator that uses a simple moving average of 20 periods, along with plots of upper and lower bands that are 2 standard deviations away from the basis line. These bands help visualize price volatility and trend based on where the price is, in relation to the bands.
The strategy doesn't take into account any other parameters such as Volume / RSI / Fundamentals etc, so user must use discretion based on confirmations from another indicator or based on fundamentals. The strategy results are based on purely long and short trades and doesn't take into account any user defined targets or stop losses.
The strategy works great when the price closes above/below upper/lower bands with continuation on next bar. It is definitely useful to have this strategy or the Bollinger Bands filter along with other indicators to get early glimpse of breach/fail of bands on candle close during BB squeeze or based on volatility .
This can be used on Heikin Ashi candles for spotting trends, but HA candles are not recommended for trade entries as they don't reflect true price of the asset.
The strategy settings default is 55 SMA and 1 standard deviation for Bollinger Bands filter, but these can be changed from settings.
It is definitely worth reading the 22 rules of Bollinger Bands written by John Bollinger if interested in trading Bollinger Bands successfully.
QuantNomad - Heikin-Ashi PSAR StrategyContinue experimenting with different combinations of strategies.
Here is the PSAR Strategy calculated based on HA candles. HA is already calculated inside the script, do not apply it to HA candles.
Strategy is calculated based on 25% equity invested with 0.1% commission.
####################
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Varprice4 - Price is the real KingWhen you use any indicators you suffer of lagging and possibile mistakes.
In this case, higher movements of the (daily) prices (long green candle) are a signal that market is appreciating your stock. The variation of a single candle is compared to standard deviation of the stock.
Besides normal money management (on fixed percentages), we have kept the possibily of exiting the position before stop loss adding a multiplier considering that red (or black) candles are normally wider than green (white) ones.
Setup Trend Following Bollinger Bands - ValenteBuy when the candle closes above upper BB
Sell when the candle closes bellow lower BB
Stop always on base line
ATR_Trade_strategyATR Based Strategy
Identify the ATR range on Daily Chart.
ATR HIGH= Previous Close +ATR
ATR Low =Previous Close - ATR
Long when Close is above ATR High
Short when Close is below ATR Low
Exit when close moves below EMA(10) OR
a user-selected max loss
Grab Trading SystemHello All,
This is "Grab Trading System" script defined in the book "Trend Following" by Michael W. Covel. also named as "Two-box system". I made small changes and I guess that it can be improved more.
The definition: Far box defines major trend; system trades only in same direction as major trend, meanwhile fading the signals of near box. Last trade in each trend exits at break of far box - at the same time as the trend reverses. All trades, except the last in the trend, use a limit order, as they are fading the near box. The last trade exits on a stop, as the trend changes.
As you can see there is Longterm Period and Shortterm Period in the indicator options. Longterm period is used for major trend and shortterm period is used to take position according to major trend. in my test I got better performance in small time frames. you need to set longterm/shortterm periods by your trading strategies.
Enjoy!
Volume Weighted Bollinger Bands Strategy
Simple strategy,
Using Volume weighted Bollinger Bands
> Directions for Usage:
1. Use only in scripts where volume is specified by tradingview
2. Check on which timeframe the script has a profit factor greater than 1.4
3. Use that timeframe for profitability
4. In some high liquid securities there is a decent profit factor even at 5 min scale (optimise at your end!! all i want to say)
Enjoy!
Hope this helps!!
MARKET DYNAMICS HH LL BREAKOUTThis strategy is designed for Bank nifty and Nifty Indices on 5 min chart.This positional strategy ,go long when the long signal came and exit your buy position when sell signal generated by the strategy and again go short for next trade e g . when long signal came buy bank nifty 25 quantity ,book your profit or loss in next sell signal and again made SELL position with 25 quantity.
it is a non repainting strategy. this is just a breakout strategy and its accuracy is good. Slippages are not considered in the return.
SOJA PIVOTStrategy using SOJA HUNTER indicator for buy and Pivot points for sell :
-1st TP at R1 with 25% shares
-2nd TP at R2 with 25% shares
SL using trailing stop.
Channel Break [for free bot]I present to you a script for testing the channel breakout strategy for the Bitmex exchange.
Cryptocurrency itself is a trending tool, which is why breakout strategies generate the largest profits, and the channel breakout strategy is one of the most effective trend strategies.
The optimization result shows the result of trading on a volume of 20% of the deposit. But since Bitmex trades in futures contracts, you can use 50%, 100% and even much more, depending on your attitude to risk.
At the time of publication on the Bitmex exchange there are 12 different contracts, i.e. You can diversify your trading well (by pre-optimizing the settings for each contract).
In the script, you can set up many trading options - timeframe, periods for buying and selling, method of exiting a trade, stop loss, take profit, risk management, etc.
Thus, you create a strategy "for yourself".
Представляю Вам скрипт для тестирования стратегии пробоя канала для биржи Битмекс.
Криптовалюта, сама по себе является трендовым инструментом, именно поэтому, пробойные стратегии генерируют самую большую прибыль, а стратегия пробоя канала – является одной из самых эффективных трендовых стратегий.
На результате оптимизации показан результат торговли на объеме в 20% от депозита. Но так как на Битмекс торговля идет фьючерсными контрактами, Вы можете использовать 50%, 100% и даже намного больше, в зависимости от Вашего отношения к риску.
На момент публикации на бирже Битмекс есть 12 разных контрактов, т.е. Вы можете хороши диверсифицировать свою торговлю (предварительно оптимизируя настройки по каждый контракт).
В скрипте Вы можете настроить множество вариантов торговли - таймфрейм, периоды для покупки и продажи, метод выхода из сделки, стоп-лосс, тейк-профит, рискменеджмент и т.п.
Таким образом Вы создаете стратегию "под себя".
ADX_TSI_Bol Band Trend ChaserThe idea of this script is to be a low risk strategy on trending stocks (or any other trending market), aiming to achieve minimal draw down (e.g. at time of writing AAPL only had ~1.36% draw down, FB ~1.93% draw down and the SPY was 0.80% draw down and all remained profitable).
Testing proved it shouldn't be used in choppy stocks and best period was on daily charts. The back test filter goes back until 2010 so you can obtain 10 years of data.
The strategy utilizes the 200 Moving Average, a Custom Bollinger Band, a TSI with 52 period weighted moving average and ADX strength.
Although back test dates are set to 2010 - 2020, all other filters (moving average, ADX, TSI , Bollinger Band) are not locked so they can be user amended if desired. However the current settings have been tested with manual trading for quite some time to get this combination correct.
Buy signal is given when trading above the 200 moving average + 5 candles have closed above the upper custom Bollinger + the TSI is positive + ADX is above 20.
As back testing proved that this traded better only in tends then some Sell/Short conditions have been removed from the script and this only takes Long orders.
Only requires 2 additional lines of code to add shorting order and then remove the "buy" condition and this could be used for a downward trending stock instead.
Close for either long or short trades is signaled once the TSI crosses in the opposite direction indicating change in trend strength.
Further optimization could be achieved by adding a stop loss, which I may do in the future.
NOTE: This only shows the lower indicators however for visualization you can use my script "CUSTOM BOLLINGER WITH SMA", which is the upper indicators in this strategy.
This is my first attempt at coding a strategy so I'm happy to receive any feedback or hints on how this could be written better from any experienced coders!
NASDAQ:AAPL AMEX:SPY
ATR Parabolic SAR Strategy [QuantNomad]I created a version of Parabolic SAR when I accelerate it not based on the difference from the extreme point but based on current ATR. So the idea is that for a more volatile market it should move faster.
Performance is calculated based on 25% equity invested and 0.1% commission.
What do you think about it? Does it make sense to do something like that?
Do you have in mind other ways I can accelerate it when the market starts to be more volatile?
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as good as in historical backtesting.
This post and the script don’t provide any financial advice.
Donchian Strat EXMOThis is simple test of Turtle Trading strategy by Richard Dennis. The script meant to place orders on Donchian Channel borders. It's best to test and use on mid-term charts like 1H and more.
I've chosen Kraken XBT/USDT chart because this market opened in december 2019. The main problem of crypto trading strategy testing is the bullish market of 2017 year. That enormous growth gives unrealisting expectations to all trend-following strategies tested.
WOMBO COMBO: EMA & VWAP & MACD & BB & STCHello my fellow investors,
After hours of reading, backtesting, and YouTube video watching I discovered that EMA, VWAP, BB, MACD, and STC produce the most consistent results for investment planning. This strategy allows you to pick between the aforementioned indicators or layer them together.
It works on the pricipal of:
1) Always follow the market trend - buy/sell above/below 200EMA
2) Follow corporate investing trends - buy/sell above/below VWAP
3) Apply MACD check - buy--> MACD line above signal line and corssover below histogram \\ sell --> MACD line below signal line and crossover above histogram.
4) Check volitility with price against BB limits upper/Sell or lower/buy
5) When STC crosses about 10 buy and when it drops below 90 sell
6) Exit position when stop loss is triggered or profit target is hit. BB also provides a parameter to exit positions.
This code is the product of many hours of hard work on the part of the greater tradingview community. The credit goes to everyone in the community who has put code out there for the greater good.
Highest High and Lowest Low Channel StrategyHighest / Highest High Highest (Data) - HHV (Data, Period)
Lowest / Lowest Low Lowest (Data) LLV (Data, Period)
These functions calculate the highest / lowest value of a selected data.
Highest High and Lowest Low options are mostly used.
The Highest function calculates the highest value of the selected data in the past.
The Lowest function calculates the lowest value of the selected data in the past.
Twin Range Filter Algo@Colinmck used two different ranges to generate signals. Read his release notes to find out what the original script does.
I added one condition which seems to increase performance on 15m BTCUSD as well as 1h BTCUSD and that is ATR with 32 periods being smaller than ATR with 64 periods. I used my script Volatility Optimiser to discover this tendency.
Both buying and selling conditions are same as in @Colinmck's script plus one condition of my own. You can disable my condition.
Target and stop-loss are manually set values in ticks.
Time stop-loss is manually set value in a number of candles. After this number of candles, a position always exits (or should 😇). You can disable it by inserting a very long period. I do not recommend it, because a value of indicator should not be measured in luck and if market starts moving in the direction after 40 periods, the predictive capability of an indicator is questionable.
I used 300/150/17 for 15m BTCUSD chart and 900/30/17 for 1h BTCUSD. I didn't try to optimize any other parameters for these periods.
Since this script relies mostly on volatility for its prediction, I wouldn't recommend using it on its own. Individual approach to the market is recommended. Also, it didn't work on EURUSD when using the same default values and different order management (tp, sl, time sl), so it is probably not as versatile.
Let me know what do you think of this strategy. If you have some ideas about how to make it more reliable, share it in the comments, I might put it to the test. Good luck 🍀