Extended Price Volume Trend Strategy : EducationalThe Extended Price Volume Trend (EPVT) is a technical indicator that is used to identify potential trend changes and measure the strength of a trend. In this strategy, we combine the EPVT with other indicators to create a trading system that aims to capture trend reversals and momentum shifts.
The EPVT indicator is calculated by taking the cumulative volume and multiplying it by the percentage change in price. We then find the highest and lowest values of this indicator over a certain period of time to determine the baseline. The difference between the EPVT and the baseline is then plotted on a chart to create the EPVT line.
To use this indicator for trading, we look for crossovers of the EPVT line with zero. When the EPVT crosses above zero, it indicates that buying pressure is increasing, and we may consider taking a long position. Conversely, when the EPVT crosses below zero, it indicates that selling pressure is increasing, and we may consider taking a short position.
To further refine our trading signals, we use three take-profit levels, which we set as a percentage of the current EPVT value. We also use a simple moving average to provide additional confirmation of trend changes.
In summary, the EPVT trading strategy is a technical analysis-based approach to trading that aims to identify potential trend reversals and momentum shifts. By combining the EPVT indicator with other technical tools, we can create a comprehensive trading system that provides clear entry and exit signals for both long and short positions. Please note that this strategy is for educational purposes only and should not be taken as financial advice.
Trend Analysis
BankNifty 5min Supertrend Based StrategyBankNifty 5min Supertrend Based Strategy, Intraday.
Work Best at 5mint chart on BankNifty.
The strategy is designed to trade using the Supertrend indicator with session-based rules, and risk management. It allows for customization through input variables and aims to provide a clear visual representation of the Supertrend by changing the color .
The script also includes input variables for the trading session and date range, which allows the trader to specify the time period in which they want the strategy to run. The session variable specifies the start and end times of the trading session, which in this case is set to the Indian trading session from 9:15 am to 3:10 pm.
The strategy starts by defining input variables such as the session time, start and end date for the backtesting, the length of the ATR, and the Supertrend factor. It also includes options for delay at session start and stop loss points and trail percentage .
The code then checks if the current time is within the specified session and date range . If it is, the Supertrend and its direction are calculated using the defined input variables. The strategy then waits for N numbers of candles (defined by the User) to form at the start of every session i.e. 09:15 AM before entering a trade.
The entry and exit conditions for long and short trades are defined based on the change in the Supertrend direction and the number of candles formed at the session start i.e. 09:15 AM . After that, it takes entry and exit for long and short trades on the change in the Supertrend direction . Stop-loss and trailing stop-loss are also defined based on the input variables.
Stop-loss (Defined by the user) is fixed points either below or above the Entry Price for Long and Short entries.
The Supertrend plot is displayed with changing colors depending on the direction. Finally, the strategy closes all trades at the end of the session if there are any open trades.
Overall, this strategy aims to trade with the Supertrend indicator using session-based rules and risk management.
However, as with any trading strategy, it is important to thoroughly test it before using it in live trading .
8 Day Run - Momentum StrategyInspired by Linda Bradford Raschke.
Entry criteria:
This strategy is used to capture momentum effects on the daily periodicities. Once prices have had a run of 8 or more consecutive closes above or below the 5-period simple moving average the strategy is primed to trade.
It will then enter a short on the first close above the 5sma after a run of 8 or more closes below the 5sma (it will enter a long when the price closes below the 5sma after a run of 8 or more closes above the 5sma).
Exit criteria:
All trades are exited on the first close back above/ below the 5sma.
Strategy for UT Bot Alerts indicator Using the UT Bot alerts indicator by @QuantNomad, this strategy was designed for showing an example of how this indicator could be used, also, it has the goal to help some people from a group that use to use this indicator for their trading. Under any circumstance I recommend to use it without testing it before in real time.
Backtesting context: 2020-02-05 to 2023-02-25 of BTCUSD 4H by Tvc. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 3 indicators are used:
UT Bot Alerts indicator by Quantnomad
One Ema of 200 periods for indicate the trend
Atr stop loss from Gatherio
Trade conditions:
For longs:
Close price is higher than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as buy (open long position)
The other half will be closed when close price is lower than Atr and Ema from UT Bot cross under Atr. This will be showed as cl buy (close long position)
For shorts:
Close price is lower than Atr from UT Bot
Ema from UT Bot cross over Atr from UT Bot.
This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as sell (open short position)
The other half will be closed when close price is higher than Atr and Ema from UT Bot cross over Atr. This will be showed as cl sell (close short position)
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
---> Do not forget to deactivate Trades on chart option in style settings for a cleaner look of the chart <---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
---> The strategy can still be improved, you can change some parameters depending of the asset and timeframe like risk/reward for taking profits, for break even, also the main parameters of the UT Bot Alerts <----
NIFTY 50 5mint StrategyThis is an intraday strategy for NIFTY50 Based First candle High and Low breakout.
The strategy takes user inputs for the start and end dates, start and end months, and start and end years, which define the time range to trade. The user can also specify the maximum number of trades to take during the time range and the length of the Exponential Moving Average ( EMA ) used in the strategy
In this strategy, the First candle's high and low are calculated and used as entry and exit points for trades. If the close price breaks above the First candle's high, a buy signal is generated. Conversely, if the close price breaks below the First candle's low, a sell signal is generated.
The strategy uses the Exponential Moving Average ( EMA ) as a filter to close entered positions either long or short, EMA also acts Target. If the close price falls below the EMA, a long position is closed, and if the close price rises above the EMA, a short position is closed or the PreviousCandleClose is above the First candle's high a short position is closed, When the PreviousCandleClose is below the First candle's low a long position is closed, First candle's high act as Stoploss
The strategy limits the number of trades taken within the specified time range, and if the time range is exceeded, all positions are closed.
Finally, the strategy plots the First candle's high and low, EMAs on the chart for visual reference.
Default settings work best with the 5mint candle, you may tweak settings according to your needs.
backtesting helps in interpreting how the trading strategy would have behaved in the past, and forward testing (paper trading) informs the traders how it would perform now.
Baseline Cross Qualifier Volatility Strategy with HMA Trend BiasFor trading ES on 30min Chart
Trading Rules
Post Baseline Cross Qualifier (PBCQ): If price crosses the baseline but the trade is invalid due to additional qualifiers, then the strategy doesn't enter a trade on that candle. This setting allows you override this disqualification in the following manner: If price crosses XX bars ago and is now qualified by other qualifiers, then the strategy enters a trade.
Volatility: If price crosses the baseline, we check to see how far it has moved in terms of multiples of volatility denoted in price (ATR x multiple). If price has moved by at least "Qualifier multiplier" and less than "Range Multiplier", then the strategy enters a trade. This range is shown on the chart with yellow area that tracks price above/blow the baseline. Also, see the dots at the top of the chart. If the dots are green, then price passes the volatility test for a long. If the dots are red, then price passes the volatility test for a short.
Take Profit/Stoploss Quantity Removed
1 Take Profit: 100% of the trade is closed when the profit target or stoploss is reached.
2 Take Profits: Quantity is split 50/50 between Take Profit 1 and Take Profit 2
3 Take Profits: Quantify is split 50/25/25.
Stratgey Inputs
Baseline Length
37
Post Baseline Cross Qualifier Enabled
On
Post Baseline Cross Qualifier Bars Ago
9
ATR Length
9
Volatility Multiplier
0
Volatility Range Multiplier
10
Volatility Qualifier Multiplier
2
Take Profit Type
1 Take Profit
HMA Length
11
Investments/swing trading strategy for different assetsStop worrying about catching the lowest price, it's almost impossible!: with this trend-following strategy and protection from bearish phases, you will know how to enter the market properly to obtain benefits in the long term.
Backtesting context: 1899-11-01 to 2023-02-16 of SPX by Tvc. Commissions: 0.05% for each entry, 0.05% for each exit. Risk per trade: 2.5% of the total account
For this strategy, 5 indicators are used:
One Ema of 200 periods
Atr Stop loss indicator from Gatherio
Squeeze momentum indicator from LazyBear
Moving average convergence/divergence or Macd
Relative strength index or Rsi
Trade conditions:
There are three type of entries, one of them depends if we want to trade against a bearish trend or not.
---If we keep Against trend option deactivated, the rules for two type of entries are:---
First type of entry:
With the next rules, we will be able to entry in a pull back situation:
Squeeze momentum is under 0 line (red)
Close is above 200 Ema and close is higher than the past close
Histogram from macd is under 0 line and is higher than the past one
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
For closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Second type of entry:
With the next rules, we will not lose a possible bullish movement:
Close is above 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entry, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
---If we keep Against trend option activated, the rules are the same as the ones above, but with one more type of entry. This is more useful in weekly timeframes, but could also be used in daily time frame:---
Third type of entry:
Close is under 200 Ema
Squeeze momentum crosses under 0 line
Once these rules are met, we enter into a buy position. Stop loss will be determined by atr stop loss (white point) and break even(blue point) by a risk/reward ratio of 1:1.
Like in the past type of entries, for closing this position: Squeeze momentum crosses over 0 and, until squeeze momentum crosses under 0, we close the position. Otherwise, we would have closed the position due to break even or stop loss.
Risk management
For calculating the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a buy signal at price of 4,000 usd. The stop loss price from atr stop loss is 3,900. You calculate the distance in percent between 4,000 and 3,900. In this case, that distance would be of 2.50%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(2,5%) = 1000usd. It means, you have to use 1000 usd for risking 2.5% of your account.
We will use this risk management for applying compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
If you activate break even using rsi, when rsi crosses under overbought zone break even will be activated. This can work in some assets.
---Important: In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital---
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Some assets and timeframes where the strategy has also worked:
BTCUSD : 4H, 1D, W
SPX (US500) : 4H, 1D, W
GOLD : 1D, W
SILVER : 1D, W
ETHUSD : 4H, 1D
DXY : 1D
AAPL : 4H, 1D, W
AMZN : 4H, 1D, W
META : 4H, 1D, W
(and others stocks)
BANKNIFTY : 4H, 1D, W
DAX : 1D, W
RUT : 1D, W
HSI : 1D, W
NI225 : 1D, W
USDCOP : 1D, W
Kimchi Premium StrategyThis strategy is based on the Korea Premium, also known as the “Kimchi Premium,” which indicates how expensive or cheap the price of Bitcoin in Korean Won on a Bitcoin exchange in South Korea is relative to the price of Bitcoin being traded in USD or Tether. Inverse Kimchi Premium RSI was newly defined to create a strategy with Kimchi Premium. Assuming that the larger the kimchi premium, the greater the individual's purchasing power. In this case, if the Inverse Kimchi Premium RSI falls and closes the candle below the bear level, a short is triggered. Long is the opposite.
This strategy defaults to a combination of the traditional RSI and the Inverse Kimchi Premium RSI. If the user wishes to unlock the Inverse Kimchi Premium RSI combination and only use it as a traditional RSI strategy, the following settings can be used.
Use Combination of Inverse Kimchi Premium RSI: Uncheck
Resolution: Chart (4hr Candle)
Source: Close
Length of RSI: 14
Bull Level: 74
Bear Level: 25
__________________________________________________________________________________
김치프리미엄(김프) 전략은 달러 혹은 테더로 거래되고 있는 비트코인 가격 대비 한국에 있는 비트코인 거래소의 비트코인 원화 가격이 얼마나 비싸고 싼 지를 나타내는 코리아 프리미엄, 일명 "김치 프리미엄" 지표를 기반으로 만들어졌습니다. 김치 프리미엄을 가지고 전략을 만들기위해 Inverse Kimchi Premium RSI를 새롭게 정의하였습니다. 김치 프리미엄이 커질수록 개인의 매수세가 커진다고 가정하고, 이 경우 Inverse Kimchi Premium RSI이 하락하여 Bear Level 아래에서 캔들 마감을 하면 Short을 트리거 합니다. Long은 그 반대입니다.
이 전략은 전통적인 RSI와 Inverse Kimchi Premium RSI을 조합하여 기본값을 설정하였습니다. 유저가 원한다면 Inverse Kimchi Premium RSI의 조합을 해제하고 전통적인 RSI 전략으로만 사용하려면 아래 다음의 설정값을 사용할 수 있습니다.
Use Combination of Inverse Kimchi Premium RSI: 체크 해제
Resolution: Chart (4hr Candle)
Source: Close
Length of RSI: 14
Bull Level: 74
Bear Level: 25
Strategy Myth-Busting #13 - MultiEMA+BXTrender - [SP/MYN]#13 on the Myth-Busting bench, we are automating the "I Found The Highest Win Rate 15 Minute Scalping Trading Strategy Ever" strategy from "TradeIQ" who claims to have backtested this manually and achieved 410% profit over 100 trades within 6 months on Natural Gas with 79 Wins / 21 Losses with an astounding 3.96% Max Drawdown.
It was quite challenging emulating the same subjective EMA pullback logic along with the dependent sequencing of events necessary to enter a trade and we might improve on this to make it better in the future. Super kudos to @spdoinkal who helped with this strategy. If you have ideas on how this could be improved on, would love to hear about them.
As is, we were unable to substantiate similar results to what was manually backtested by TradeIQ, we do however see potential here. Given some optimizations and improvements to the the entry logic accommodating for a wider more variable margin after pullbacks reestablish above/below the fast EMA we think the performance of this strategy could certainly be improved upon. So not sure if we have totally myth busted this completely at this point in time.
This strategy uses a combination of 2 open-source public indicators:
3 EMA's (Trading View Internal)
B-Xtrender by Puppytherapy
Three separate (21), (89) and (200) EMA's are used as a means to confirm and keep entry out of ranged markets. When the 3 EMA's are all clumped up together with no distance it's indicative of a flat or ranged market. This is then used in conjunction with B-XTrender as a means to detect the trend direction. B-XTrender which is a trend following indicator originally published in the IFTA Journal by Bharat Jhunjhunwala. It uses both a short and long term lengths along with a compound EMA used as a means to smooth and sample trend direction.
Trading Rules
15 min candles but other lower time-frames
Stop Loss on previous swing high/low
No Take Profit, Exit on new red/green circles from BX-Trender
Long
EMA Green (21) on top, White (89)in middle and red (200) on bottom and there is distance between EMA's need to be spaced, otherwise in a ranged market
Price action must pull back into 89 EMA (White line) either close or touching it.
Once pullback occurs wait for BX Trender to issue a new green circle and BX Trend line must be green and above 0
Price action must also pull up back above the (Green Line) EMA 21
Short
EMA Red (200) on top, White (89) in middle and Green (21) on bottom and there is distance between EMA's need to be spaced, otherwise in a ranged market
Price action must pull back into 89 EMA (White line) either close or touching it.
Once pullback occurs wait for BX Trender to issue a new red circle and BX Trend line must be red and below 0
Price action must also pull up back below the (green Line) EMA 21
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
Strategy Myth-Busting #12 - OSGFC+SuperTrend - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our 12th one is an automated version of the "The Most Powerful Tradingview Buy Sell Signal Indicator " strategy from "Power of Trading" who doesn't make any official claims but watching how he trades with this, it on the surface looked promising. The strategy author uses this on the 15 min strategy on mostly FOREX. Unfortunately as indicated by the backtest results below, we were not able to substantiate any good positive trading metrics from this, be it Profit, Markdown, Num Of Trades etc. This does seem to do okay with some entries but perhaps adding another indicator to this to filter out more noise might make it better. At least how this strategy is presented now, this is not something I recommend anyone use.
This strategy uses a combination of 2 open-source public indicators:
SuperTrend by TradingView Internal
One-Sided Gaussian Filter w/ Channels By Loxx
The SuperTrend indicator and the One-Sided Gaussian Filter complement each other by providing a more complete and accurate picture of market trends. The SuperTrend indicator is used to identify trends. It does this by calculating a moving average of the underlying securities price and then comparing the current price to the moving average. When the current price is above the moving average, the trend is considered bullish, and when it is below, the trend is considered bearish.
The One-Sided Gaussian Filter is a mathematical tool that is used to smooth out fluctuations in financial data. It does this by removing random noise from the data, making it easier to identify patterns and trends.
When the SuperTrend indicator is used in conjunction with the One-Sided Gaussian Filter, the smoothed price data generated by the filter is used as the input for the SuperTrend calculation. This provides a more accurate representation of market trends and helps to eliminate false signals generated by short-term price movements. As a result, the SuperTrend indicator is able to more accurately identify the underlying trend in the market and provide traders with a cleaner and more reliable signal to act upon.
In summary, the SuperTrend indicator and the One-Sided Gaussian Filter complement each other by providing a more accurate and reliable representation of market trends, resulting in improved performance for traders.
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
Trading Rules
15 min candles
FOREX or Crypto
Stop loss at swing high/low | 1.5 risk/ratio
Long Condition
SuperTrend and OSGFC generate buy signal
Close Buy on Gaussian generating a sell signal
Short Condition
SuperTrend and OSGFC generate sell signal
Close Buy on Gaussian generating a buy signal
smplondonclinic StrategyHello my friend! I'm uploading the code for your strategy. I have included a feature in the settings menu called "Entry Direction" that you can use to isolate only longs, only shorts or have both directions at the same time for the backtesting. I have set the strategy to only open 1 position at a time, it will not open a new position unless the previous position is closed. If you want to remove that just let me know. The green/red triangles that you will see plotting on the chart are the potential entry signals, you can turn them off from the style panel in the settings menu. In the inputs tab besides the strategy settings you also have all the relevant parameters for the three indicators used.
DCA Simulator A simple yet powerful Dollar Cost Averaging (DCA) simulator.
You just add the script to your chart, and you'll be able to see:
- Every single entry with its size
- The evolution of you average price in time (blue line)
- The profit and loss areas (where market price < average price the DCA is at loss, and the background is colored in red. At the contrary, where mkt price is > average price, it's profit area and the background is green).
- Max drawdown: the point in price and time where the DCA loss is maximum in the considered time interval. The drawdown amount is specified.
- Profit (or loss) and total cost at the end of the time interval or at the present day: the script shows how much the DCA is netting at a profit or loss, as well as the total cost of the DCA itself.
The parameters are:
- Date start and date end: time interval of the DCA simulation
- DCA period (you can choose between daily, weekly and monthly)
- Week day or month day if you choose those periods
- Single operation size (in base currency)
- Option to choose a DCA LONG or DCA SHORT (for uber bears)
- Option to include an exit strategy that partially closes your position (the % size closed can be chosen as well with the parameter "exit_close_perc") every time the DCA realizes a specific gain (choosable with the parameter "exit_gain_threshold"). If you choose "none" as an exit strategy, the script will assume to never close positions until the end of the period or the present day for simulation purpose.
NB: just ignore the TV strategy tester results, all the data are visible on the chart.
Band-Zigzag - TrendFollower Strategy [Trendoscope]Strategy Time!!!
Have built this on my earlier published indicator Band-Zigzag-Trend-Follower . This is just one possible implementation of strategy on Band-Based-Zigzag .
🎲 Notes
Experimental prototype. Not financial advise and strategy not guaranteed to make money despite backtest results
Not created or tested for any specific instrument or timeframe
Test and adopt with own risk
🎲 Strategy
This is trend following strategy built based on Bands and Zigzag. Traits of trend following strategies are
Lower win rate (Yes, thats right)
High risk reward (Compensates low win rate)
Higher drawdown
If market is choppy, trend following methods suffer.
The script implements few points to overcome the negatives such as lower win rate and higher drawdown by actively assessing pivots on the direction of trend along. This helps us take regular profits and exit on time during the end of trend. Most of the other concepts are defined and explained in indicator - Band-Zigzag-Trend-Follower and Band-Based-Zigzag
Defining a trend following method is simple. Basic rule of trend following is Buy High and Sell Low (Yes, you heard it right). To explain further - methodology involve finding an established trend which is flying high and join the trend with proper risk and optimal stop. Once you get into the trade, you will not exit unless there is change in the trend. Or in other words, the parameters which you used to define trend has reversed and the trend is not valid anymore.
🎯 Using bands
When price breaks out of upper bands (example, Bollinger Band , Keltener Channel, or Donchian Channel), with a pre determined length and multiplier, we can consider the trend to be bullish and similarly when price breaks down the lower band, we can consider the trend to be bearish .
🎯 Using Pivots
Simple logic using zigzag or pivot points is that when price starts making higher highs and higher lows, we can consider this as uptrend. And when price starts making lower highs and lower lows, we can consider this as downtrend. There are few supertrend implementations I have published in the past based on zigzags and pivot points .
Drawbacks of both of these methods is that there will be too many fluctuations in both cases unless we increase the reference length. And if we increase the reference length, we will have higher drawdown.
🎯 Band Based Zigzag Method
Here we use bands to define our pivot high and pivot low - this makes sure that we are identifying trend only on breakouts as pivots are only formed on breakouts
Our method also includes pivot ratio to cross over 1.0 to be able to consider it as trend. This means, we are waiting for price also to make new high high or lower low before making the decision on trend. But, this helps us ignore smaller pivot movements due to the usage of bands.
I have also implemented few tricks such as sticky bands (Bands will not contract unless there is breakout) and Adaptive Bands (Band will not expand unless price is moving in the direction of band). This makes the trend following method very robust.
To avoid fakeouts, we also use percentB of high/low in comparison with price retracement to define breakout.
🎲 Settings
Settings are fairly simpler and are explained as below. You will find most of the required information in tooltips.
Flying Dragon Trend StrategyFlying Dragon Trend Strategy can be used to indicate the trend on all timeframes by finetuning the input settings.
The Flying Dragon Trend family includes both the strategy and the indicator, where the strategy supports of selecting the optimal set of inputs for the indicator in each scenario. Highly recommended to get familiar with the strategy first to get the best out of the indicator.
Flying Dragon Trend plots the trend bands into the ribbon, where the colours indicate the trend of each band. The plotting of the bands can be turned off in the input settings. Based on the user selectable Risk Level the strategy is executed when the price crosses the certain moving average line, or at the Lowest risk level all the bands have the same colour.
The main idea is to combine two different moving averages to cross each other at the possible trend pivot point, but trying to avoid any short term bounces to affect the trend indication. The ingenuity resides in the combination of selected moving average types, lengths and especially the offsets. The trend bands give visual hint for the user while observing the price interaction with the bands, one could say that when "the Dragon swallows the candles the jaws wide open", then there is high possibility for the pivot. The leading moving average should be fast while the lagging moving average should be, well, lagging behind the leading one. There is Offset selections for each moving average, three for leading one and one for the lagging one, those are where the magic happens. After user has selected preferred moving average types and lengths, by tuning each offset the optimal sweet spot for each timeframe and equity will be found. The default values are good enough starting points for longer (4h and up) timeframes, but shorter timeframes (minutes to hours) require different combination of settings, some hints are provided in tooltips. Basically the slower the "leading" moving average (like HMA75 or HMA115) and quicker the "lagging" moving average (like SMA12 or SMA5) become, the better performance at the Lowest risk level on minute scales. This "reversed" approach at the minute scales is shown also as reversed colour for the "lagging" moving average trend band, which seems to make it work surprisingly well.
The Flying Dragon Trend does not necessarily work well on zig zag and range bounce scenarios without additional finetuning of the input settings to fit the current condition.
Strategy direction selector by DashTrader.
Bull Trend Filtered StochRSI (BTFS)Ride Bull Trends Via Stochastic with Special Rules for Heavy Bullish Bias
TLDR: Long Only Trend Indicator Where you are always entered Long if the stochastic is over the lower band line and the price is above the Donchian Chanel high. Exit when Stochastic RSI is below the lower band.
Indicators:
Filter = Trend/Bullish indicator is Donchian of ema(high) this is set as the highest ema(high, 6) in the last 30 candles. this can be adjusted to fit the market as desired.
**indicator prints green background when the filter condition is satisfied***
Entry Exit = enter when the Stoch RSI is above the given lower trend band. This value is set at 35 but can be adjusted according to risk tolerance and market conditions.
Logic:
this indicator allows a trader to be present during bullish/parabolic trends by only triggering if the close is > than the highest 6 candle average high over the last 30 candles. This filter requires the market to be in a generally bullish posture. If the market is in this condition the stochastic RSI indicator value offers a good gauge of price action and only goes significantly down if price trends below the average range of the rsi period. This filters out noise and keeps a trader from over trading on inconsequential corrections while responding fairly quickly to changes in general trend direction. the response is fast enough to produce an unprofitable amount of false signals if the bull market filter is not implemented. However when used in combination the signals return desirable results in bull trending markets.
Hope this Helps. Happy Trades.
-Snarky Puppy
Ichimoku Cloud and ADX with Trailing Stop Loss (by Coinrule)The Ichimoku Cloud is a collection of technical indicators that show support and resistance levels, as well as momentum and trend direction. It does this by taking multiple averages and plotting them on a chart. It also uses these figures to compute a “cloud” that attempts to forecast where the price may find support or resistance in the future.
The Ichimoku Cloud was developed by Goichi Hosoda, a Japanese journalist, and published in the late 1960s. It provides more data points than the standard candlestick chart. While it seems complicated at first glance, those familiar with how to read the charts often find it easy to understand with well-defined trading signals.
The Ichimoku Cloud is composed of five lines or calculations, two of which comprise a cloud where the difference between the two lines is shaded in.
The lines include a nine-period average, a 26-period average, an average of those two averages, a 52-period average, and a lagging closing price line.
The cloud is a key part of the indicator. When the price is below the cloud, the trend is down. When the price is above the cloud, the trend is up.
The above trend signals are strengthened if the cloud is moving in the same direction as the price. For example, during an uptrend, the top of the cloud is moving up, or during a downtrend, the bottom of the cloud is moving down.
DMI is simple to interpret. When +DI > - DI, it means the price is trending up. On the other hand, when -DI > +DI, the trend is weak or moving on the downside. The ADX does not give an indication of the direction but about the strength of the trend.
Typically values of ADX above 25 mean that the trend is steeply moving up or down, based on the -DI and +DI positioning. This script aims to capture swings in the DMI, and thus, in the trend of the asset, using a contrarian approach.
Trading on high values of ADX, the strategy tries to spot extremely oversold and overbought conditions. Values of ADX above 45 may suggest that the trend has overextended and is maybe about to reverse.
This strategy combines the Ichimoku Cloud with the ADX indicator to better enter trades.
Long orders are placed when these basic signals are triggered.
Long Position:
Tenkan-Sen is above the Kijun-Sen
Chikou-Span is above the close of 26 bars ago
Close is above the Kumo Cloud
MACD line crosses over the signal line
-DI is greater than +DI
ADX is greater than 45
Close Position:
3% increase trailing
3% decrease trailing
The script is backtested from December 2022 and provides good returns.
A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Simple SuperTrend Strategy for BTCUSD 4HHello guys!, If you are a swing trader and you are looking for a simple trend strategy, you should check this one. Based in the supertrend indicator, this strategy will help you to catch big movements in BTCUSD 4H and avoid losses as much as possible in consolidated situations of the market
This strategy was designed for BTCUSD in 4H timeframe
Backtesting context: 2020-01-02 to 2023-01-05 (The strategy has also worked in previous years)
Trade conditions:
Rules are actually simple, the most important thing is the risk and position management of this strategy
For long:
Once Supertrend changes from a downtrend to a uptrend, you enter into a long position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Now, just will be there two situations:
Once Supertrend changes from a uptrend to a downtrend, you close the other half of the initial long position.
If price goes againts the position, the position will be closed due to breakeven.
For short:
Once Supertrend changes from a uptrend to a downtrend, you enter into a short position. The stop loss will be defined by the atr stop loss
The first profit will be of 0.75 risk/reward ratio where half position will be closed. When this happens, you move the stop loss to break even.
Like in the long position, just will be there two situations:
Once Supertrend changes from a downtrend to a uptrend, you close the other half of the initial short position.
If price goes againts the position, the position will be closed due to breakeven.
Risk management
For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
Script functions
Inside of settings, you will find some utilities for display atr stop loss, supertrend or positions.
You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
Signals meanings:
L for long position. CL for close long position.
S for short position. CS for close short position.
Tp for take profit (it also appears when the position is closed due to stop loss, this due to the script uses two kind of positions)
Exit due to break even or due to stop loss
Some things to consider
USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
The amount of trades closed in the backtest are not exactly the real ones. If you want to know the real ones, go to settings and change % of trade for first take profit to 100 for getting the real ones. In the backtest, the real amount of opened trades was of 194.
Indicators used:
Supertrend
Atr stop loss by garethyeo
This is the fist strategy that I publish in tradingview, I will be glad with you for any suggestion, support or advice for future scripts. Do not doubt in make any question you have and if you liked this content, leave a boost. I plan to bring more strategies and useful content for you!
Open DriveOpen Drive is a market profile concept introduced by Jim Dalton. It occurs when the price moves directionally and persistently for the first 30 minutes from the cash market open.
It is necessary to use 30-minute bars as there needs to be enough time to measure an extreme move of the cash open. This means there will be fewer trades than other strategies using faster time periodicities.
The script finds open drives from these time points 0700/ 0800 and 1300/1430.
The entry signal also has a breakout threshold using the 5-bar high and 5-bar low to only take trades moving away from the prior 5-bar range. This weeds out most mid-range trades and small range expansion bars.
If the price has had a strong move from the open and has broken either below the prior 5-bar low or above the prior 5-bar high by an amount equal to the prior 5-bar range a trade is entered in the direction of the move.
The Exit criteria; exit after 3 bars which is 90mins when using a 30min periodicity.
Note, this script is shared to show that momentum generated on or around the cash open tends to persist. The entry and exits of this strategy are quite naive but there are plenty of ways to take more aggressive entries on faster time frames when an open drive occurs. The times chosen for this strategy will suit stock index futures mainly. The user can experiment with other futures products and their corresponding pit/ cash open hours.
Google "open drive market profile" for more information on open drives and market profile concepts.
Happy trading!
Wolfe Strategy [Trendoscope]Hello Everyone,
Wish you all Merry X-Mas and happy new year. Lets start 2023 with fresh new strategy built on Wolfe Indicator. Details of the indicator can be found here
🎲 Wolfe Concept
Wolfe concept is simple. Whenever a wedge is formed, draw a line joining pivot 1 and 4 as shown in the chart below:
For simplicity, we will only consider static value for Target and Stop. But, entry is done based on breaking the triangle. Revised strategy looks something like this:
🎲 Settings
Settings are simple and details of each are provided via tooltips.
Out of these, the most important one is minimum risk reward ratio. If you set lower risk reward threshold then losing few trades may generate more losses than more winning trades. Similarly higher value will filter out most of the trades and may not work efficiently. Default value set to 1 to make sure optimal risk reward is present before placing trade. Also make note that since the entry bar is always moving towards stop, as and when pattern progress, the RR will also increase. Hence, a pattern which is below RR threshold may become good to trade at certain point of time in future.
🎲 Strategy Parameters
Default strategy parameters are initialised via definition. Margins are set to 100 to disable leveraged trades. Appropriate values are chosen for other parameters. These can be altered based on individual strategy and trading plan.
As the strategy concentrates on the single pattern, number of trades generated are comparatively less. But, there is chance to increase the algorithm further to catch more such patterns on larger scale. Will try to work on them in next versions.
🎲 Pine Strategy limitations
Backtest can only be done on one direction as pine strategy cannot have both long and short open trades together. Hence, it is mandatory to chose either long/short trades in settings.
Since pyramiding is limited to 1, there is possibility of a pattern not generating trade even though the entry conditions are met. They are just based on pine limitations and not necessarily mean patterns are not good for placing trades.
Simple Momentum and Trend, Fixed PnL Strategy for SPY 1D [SR]This strategy uses an ATR rule to assess momentum and a TSI rule to assess bullish or bearishness
It has a fixed stop at 50 points, and fixed take profit at 300 pips
It provides a very satisfyingly smooth equity line with a max drawdown below 5% and realized profit over 200%
This is the initial version as I work out optimizations and add plots to the chart based on the strategy's actions.
I would love to get the community's feedback and help as I'm new. Not sure how to limit the date range of the backtest to make it more realistic. I'm also not certain how to plot it best.
RSI and MA with Trailing Stop Loss and Take Profit (by Coinrule)The relative strength index is a momentum indicator used in technical analysis. It measures the speed and magnitude of a coin's recent price changes to evaluate overvalued or undervalued conditions in the price of that coin. The RSI is displayed as an oscillator (a line graph essentially) on a scale of zero to 100. When the RSI reaches oversold levels, it can provide a signal to go long. When the RSI reaches overbought levels, it can mark a good exit point or alternatively, an entry for a short position. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.
A moving average (MA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range. Essentially it is used to help smooth out price data by creating a constantly updated average price.
The Strategy enters and closes trades when the following conditions are met:
Entry Conditions:
RSI is greater than 50
MA9 is greater than MA50
RSI increases by 5
Exit Conditions:
Price increases by 1% trailing
Price decreases by 2% trailing
This strategy is back-tested from 1 January 2022 to simulate how the strategy would work in a bear market. The strategy provides good returns.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Weird Renko StratThis strategy uses Renko, it generates a signal when there is a reversal in Renko. When using historical data, it provides a good entry and an okay exit. However, in a real-time environment, this strategy is subject to repaint and may produce a false signal.
As a result, the backtesting result should not be used as a metric to predict future results. It is highly recommended to forward-test the strategy before using it in real trading. I forward test it from 12/18/2022 to 12/21/2022 in paper trading, using the alert feature in Tradingview. I made 60 trades trading the BTCUSDT BINANCE 3 min with 26 as the param and under the condition that I use 20x margin, compounding my yield, and having 0 trading fee, a steady loss is generated: from $10 to $3.02.
This is quite interesting. As if I flip the signal from "Long" to "Short" and another way too, it will be a steady profit from $10 to $21.85. Hence, if I'm trying to anti-trade the real-time alert signal, the current "4 Days Result" will be good. Nevertheless, I still have to forward-test it for longer to see if it will fail eventually.
Dive into the setting of the strategy
- Margin is the leverage you use. 1 means 1x, 10 means 10x. It affects the backtest yield when you backtest
- Compound Yield button is for compound calculation, disable it to go back to normal backtesting
- Anti Strategy button is to do the opposite direction trade, when the original strat told you to "Long", you "Short" instead. Enable it to use the feature
- Param is the block size for the Renko chart
- Drawdown is just a visual tool for you in case you want to place a stop loss (represent by the semitransparent red area in the chart)
- From date Thru Date is to specify the backtest range of the strategy, This feature is turned off by default. It is controlled by the Max Backtest Timeframe which will be explain below
- Max Backtest Timeframe control the From date Thru Date function, disable it to enable the From Date Thru Date function
Param is the most important input in this strategy as it directly affects performance. It is highly recommended to backtest nearly all the possible parameters before deploying it in real trading. Some factors should be considered:
- Price of the asset (like an asset of 1 USD vs an asset of 10000 USD required different param)
- Timeframe (1-minute param is different than 1-month param)
I believe this is caused by the volatility of the selected timeframe since different timeframe has different volatility. Param should be fine-tuned before usage.
Here is the param I'm using:
BTCUSDT BINANCE 3min: 26
BTCUSDT BINANCE 5min: 28
BTCUSDT BINANCE 1day: 15
Background of the strategy:
- The strategy starts with $10 at the start of backtesting (customizable in setting)
- The trading fee is set to 0.00% which is not common for most of the popular exchanges (customizable in setting)
- The contract size is not a fixed amount, but it uses your balance to buy it at the open price. If you are using the compound mode, your balance will be your current total balance. If you are using the non-compound mode, it will just use the $10 you start with unless you change the amount you start with. If you are using a margin higher than 1, it will calculate the corresponding contract size properly based on your margin. (Only these options are allowed, you are not able to change them without changing the code)
EURUSD COT Trend StrategyThis is a long term/investment type of strategy designed to have a good idea about where the big trend direction is headed.
Its logic, its made entirely on the COT report, mainly from looking into the net non comercial positions aka the speculators.
For bullish trend we look that the difference between long non comercial vs short non comercial is higher than 0
For bearish trend we look that the difference between long non comercial vs short non comercial is lower than 0.
This is mainly as an educational tool, for a full strategy, I recommend implement other things into it, like technical analysis or risk management.
If you have any questions, please let me know !