Volatility
Rate Of Change Trend Strategy (ROC)This is very simple trend following or momentum strategy. If the price change over the past number of bars is positive, we buy. If the price change over the past number of bars is negative, we sell. This is surprisingly robust, simple, and effective especially on trendy markets such as cryptos.
Works for many markets such as:
INDEX:BTCUSD
INDEX:ETHUSD
SP:SPX
NASDAQ:NDX
NASDAQ:TSLA
Customizable Non-Repainting HTF MACD MFI Scalper Bot Strategy v2Customizable Non-Repainting HTF MACD MFI Scalper Bot Strategy v2
This script was originally shared by Wunderbit as a free open source script for the community to work with. This is my second published iteration of this idea.
WHAT THIS SCRIPT DOES:
It is intended for use on an algorithmic bot trading platform but can be used for scalping and manual trading.
This strategy is based on the trend-following momentum indicator . It includes the Money Flow index as an additional point for entry.
This is a new and improved version geared for lower timeframes (15-5 minutes), but can be run on larger ones as well. I am testing it live as my high frequency trader.
HOW IT DOES IT:
It uses a combination of MACD and MFI indicators to create entry signals. Parameters for each indicator have been surfaced for user configurability.
Take profits are now trailing profits, and the stop loss is now fixed. Why? I found that the trailing stop loss with ATR in the previous version yields very good results for back tests but becomes very difficult to deploy live due to transaction fees. As you can see the average trade is a higher profit percentage than the previous version.
HOW IS MY VERSION ORIGINAL:
Now instead of using ATR stop loss, we have a fixed stop loss - counter intuitively to what some may believe this performs better in live trading scenarios since it gives the strategy room to move. I noticed that the ATR trailing stop was stopping out too fast and was eating away balance due to transaction fees.
The take profit on the other hand is now a trailing profit with a customizable deviation. This ensures that you can have a minimum profit you want to take in order to exit.
I have depracated the old ATR trailing stop as it became too confusing to have those as different options. I kept the old version for others that want to experiment with it. The source code still requires some cleanup, but its fully functional.
I added in a way to show RSI values and ATR values with a checkbox so that you can use the new an improved ATR Filter (and grab the right RSI values for the RSI filter). This will help to filter out times of very low volatility where we are unlikely to find a profitable trade. Use the "Show Data" checkbox to see what the values are on the indicator pane, then use those values to gauge what you want to filter out.
Both versions
Delayed Signals : The script has been refactored to use a time frame drop down. The higher time frame can be run on a faster chart (recommended on one minute chart for fastest signal confirmation and relay to algotrading platform.)
Repainting Issues : All indicators have been recoded to use the security function that checks to see if the current calculation is in realtime, if it is, then it uses the previous bar for calculation. If you are still experiencing repainting issues based on intended (or non intended use), please provide a report with screenshot and explanation so I can try to address.
Filtering : I have added to additional filters an ABOVE EMA Filter and a BELOW RSI Filter (both can be turned on and off)
Customizable Long and Close Messages : This allows someone to use the script for algorithmic trading without having to alter code. It also means you can use one indicator for all of your different alterts required for your bots.
HOW TO USE IT:
It is intended to be used in the 5-30 minute time frames, but you might be able to get a good configuration for higher time frames. I welcome feedback from other users on what they have found.
Find a pair with high volatility (example KUCOIN:ETH3LUSDT ) - I have found it works particularly well with 3L and 3S tokens for crypto. although it the limitation is that confrigurations I have found to work typically have low R/R ratio, but very high win rate and profit factor.
Ideally set one minute chart for bots, but you can use other charts for manual trading. The signal will be delayed by one bar but I have found configurations that still test well.
Select a time frame in configuration for your indicator calculations.
Select the strategy config for time frame (resolution). I like to use 5 and 15 minutes for scalping scenarios, but I am interested in hearing back from other community memebers.
Optimize your indicator without filters : customize your settings for MACD and MFI that are profitable with your chart and selected time frame calculation. Try different Take Profits (try about 2-5%) and stop loss (try about 5-8%). See if your back test is profitable and continue to optimize.
Use the Trend, RSI, ATR Filter to further refine your signals for entry. You will get less entries but you can increase your win ratio.
You can use the open and close messages for a platform integration, but I choose to set mine up on the destination platform and let the platform close it. With certain platforms you cannot be sure what your entry point actually was compared to Trading View due to slippage and timing, so I let the platform decide when it is actually profitable.
Limitations: this works rather well for short term, and does some good forward testing but back testing large data sets is a problem when switching from very small time frame to large time frame. For instance, finding a configuration that works on a one minute chart but then changing to a 1 hour chart means you lose some of your intra bar calclulations. There are some new features in pine script which might be able to address, this, but I have not had a chance to work on that issue.
Gap Reversion StrategyToday I am releasing to the community an original short-term, high-probability gap trading strategy, backed by a 20 year backtest. This strategy capitalizes on the mean reverting behavior of equity ETFs, which is largely driven by fear in the market. The strategy buys into that fear at a level that has historically mean reverted within ~5 days. Larry Connors has published useful research and variations of strategies based on this behavior that I would recommend any quantitative trader read.
What it does:
This strategy, for 1 day charts on equity ETFs, looks for an overnight gap down when the RSI is also in/near an oversold position. Then, it places a limit order further below the opening of the gapped-down day. It then exits the position based on a higher RSI level. The limit buy order is cancelled if the price doesn't reach your limit price that day. So, the larger you make the gap and limit %, the less signals you will have.
Features:
Inputs to allow the adjustment of the limit order %, the gap %, and the RSI entry/exit levels.
An option to have the limit order be based on a % of ATR instead of a % of asset price.
An optional filter that can turn-off trades when the VIX is unusually high.
A built in stop.
Built in alerts.
Disclaimer: This is not financial advice. Open-source scripts I publish in the community are largely meant to spark ideas that can be used as building blocks for part of a more robust trade management strategy. If you would like to implement a version of any script, I would recommend making significant additions/modifications to the strategy & risk management functions. If you don’t know how to program in Pine, then hire a Pine-coder. We can help!
Vix FIX / StochRSI Strategy
Updated to Pine V5
Enter upon a filtered or aggressive entry
If there are multiple entry signals, allow pyramiding
Exit when there is Stochastic RSI crossover above 80
Work with some futures and futures timeframes
Based on Chris Moody's Vix Fix
Customizable Non-Repainting HTF MACD MFI Scalper Bot StrategyThis script was originally shared by Wunderbit as a free open source script for the community to work with.
WHAT THIS SCRIPT DOES:
It is intended for use on an algorithmic bot trading platform but can be used for scalping and manual trading.
This strategy is based on the trend-following momentum indicator . It includes the Money Flow index as an additional point for entry.
HOW IT DOES IT:
It uses a combination of MACD and MFI indicators to create entry signals. Parameters for each indicator have been surfaced for user configurability.
Take profits are fixed, but stop loss uses ATR configuration to minimize losses and close profitably.
HOW IS MY VERSION ORIGINAL:
I started trying to deploy this script myself in my algorithmic trading but ran into some issues which I have tried to address in this version.
Delayed Signals : The script has been refactored to use a time frame drop down. The higher time frame can be run on a faster chart (recommended on one minute chart for fastest signal confirmation and relay to algotrading platform.)
Repainting Issues : All indicators have been recoded to use the security function that checks to see if the current calculation is in realtime, if it is, then it uses the previous bar for calculation. If you are still experiencing repainting issues based on intended (or non intended use), please provide a report with screenshot and explanation so I can try to address.
Filtering : I have added to additional filters an ABOVE EMA Filter and a BELOW RSI Filter (both can be turned on and off)
Customizable Long and Close Messages : This allows someone to use the script for algorithmic trading without having to alter code. It also means you can use one indicator for all of your different alterts required for your bots.
HOW TO USE IT:
It is intended to be used in the 5-30 minute time frames, but you might be able to get a good configuration for higher time frames. I welcome feedback from other users on what they have found.
Find a pair with high volatility (example KUCOIN:ETH3LUSDT ) - I have found it works particularly well with 3L and 3S tokens for crypto. although it the limitation is that confrigurations I have found to work typically have low R/R ratio, but very high win rate and profit factor.
Ideally set one minute chart for bots, but you can use other charts for manual trading. The signal will be delayed by one bar but I have found configurations that still test well.
Select a time frame in configuration for your indicator calculations.
Select the strategy config for time frame. I like to use 5 and 15 minutes for scalping scenarios, but I am interested in hearing back from other community memebers.
Optimize your indicator without filters (trendFilter and RSI Filter)
Use the TrendFilter and RSI Filter to further refine your signals for entry. You will get less entries but you can increase your win ratio.
I will add screenshots and possibly a video provided that it passes community standards.
Limitations: this works rather well for short term, and does some good forward testing but back testing large data sets is a problem when switching from very small time frame to large time frame. For instance, finding a configuration that works on a one minute chart but then changing to a 1 hour chart means you lose some of your intra bar calclulations. There are some new features in pine script which might be able to address, this, but I have not had a chance to work on that issue.
AlphaTrend StrategyI turned the Alpha Trend indicator coded by our teacher Kıvanç Özbilgiç into a strategy. You can find the original version of the indicator here.
It sends trading signals in the regions where AlphaTrend produces Buy and Sell signals. It is a two-way strategy.
Buy Entry Long opens trade, Sell Entry Short opens trade.
Boom Hunter + Hull Suite + Volatility Oscillator StrategyTRADE CONDITIONS
Long entry:
Boom Hunter (leading indicator): Trigger line crosses over Quotient 2 line (white cross over red)
Hull Suite (trend confirmation): Price closed above hull suite line and hull suite is green (represented by horizontal line at -10 in strategy pane)
Volatility Oscillator (volatility confirmation): Volatility spike trigger line is above upper band (represented by horizontal line at -30 in strategy pane)
Short entry:
Boom Hunter (leading indicator): Trigger line crosses under Quotient 2 line (white cross under red)
Hull Suite (trend confirmation): Price closed below hull suite line and hull suite is red (represented by horizontal line at -10 in strategy pane)
Volatility Oscillator (volatility confirmation): Volatility spike trigger line is below lower band (represented by horizontal line at -30 in strategy pane)
Risk management:
Each trade risks 3% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings) or 1 ATR if swing is less than 1 ATR
TP is calculated by Risk:Reward ratio (configurable in settings)
TIPS
Timeframe: I have found good results running on BTC/USDT 5M chart
Note: To help visual identification of trade entries and exits you may wish to add the Hull Suite and Volatility Oscillator to the chart separately. It was not possible to display them in a clear way within a single panel for the strategy. Make sure you set the settings of the auxiliary indicators to match what is in the settings of this indicator if you do decide to add them.
CREDITS
Boom Hunter Pro by veryfid
Hull Suite by InSilico
Volatility Oscillator by veryfid
Steven Primo's bollinger bands strategyHi, this strategy is taken from a video made by Steven Primo. You can look it up on YouTube if you want to know about it.
It is a mean-reversion strategy based on the Bollinger Bands, in which we wait for 5 consecutive closes above the upper band, and for a short-term top. Once it happens, we place an entry order on this top, with a stop at the nearest bottom before the movement started, and use the difference from the stop and entry point to determine the target. For shorting, it's the same process, but for the downside. From my testing, only long orders were profitable, but you can configure whichever you want.
It works well for directional markets with a low level of noise, as you can see with the BTCUSD chart. One of its caveats is the short number of occurrences, and the long stop loss and target. You can enable a trailing stop, but from my testings, it just made the results worse.
I made some modifications, like removing the MA requirement, since the entry point was above it almost all the time, and I forced the BB to use a log version of the prices, so that discrepancies are eliminated. You'll also notice that you can't select an extension that is lower than 100, and that is intentional, since you're not supposed to enter a trade in which you can lose more than what you can earn.
I chose not to implement any kind of risk management, but I might do that in the future. You can leave your suggestions in the comments.
[TH] Volatility BreakoutVolatility Breakout Strategy for TradingHook.
This strategy is not for backtesting but for forward-testing starting when added to chart.
It can make and send a formatted message string for buy and sell order using alert.
Straight Trend V1Hello everyone,
We are proud to present you our "Straight Trend" Strategy.
Strategy is use a specified timeline's opening price as reference and draw a line between the current price and trend line.
Trend line is smoothed with last X times of highest and lowest values ( Donchian Methodology) in order to create less noise and fake alerts , therefore creates a channel of current prices time based opening price.
The timeline can be adjusted according to your specifications in the settings.
------
Why opening price ?
We are traders ,no matter what we do ,we always make a benchmark at the end of a day , week or at the end of a specified time line.
Example :
X commodity's price increased %15 in last days or Y commodity's price dropped %30 in last 2 weeks etc. etc.
Thats why the opening price have a hidden and much more important role in our trading sessions.
------
After the channel is created we remove the unnecessary lines from our output by filtering the direction with closing price.
IF the closing price is higher than Chanel reference price and direction goes upward the script gives you a BUY signal.
The same methodology is applied for SELL operations.
When to Take Profit?
We put a setting for profit percentage in scripts setting you can adjust the ratio as your choices.
When to Stop Loss or change direction of the trade?
The Straight Trends previously mentioned channel's inverse line was set as STOP LOSS and direction changer in the strategy with "STR-X" Marker.
Note : Strategy is much more effective with heikin-ashi bars due methodology of heikin ashi and with this bars it creates less signals with more accuracy, use at your own discretion.
Please don't hesitate to write us if you need support or assistance, we also appreciate your feedbacks.
Please be advised that this strategy is published with Educational Purposes and it is not a investment advice.
Thank you in advance.
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.
Parabolic SAR Heikin Ashi MTF Candle ScalperThis is scalper strategy designed around parabolic sar indicator, where as an input candle value it uses the heikinashi from a higher timeframe.
This example has been adapted to SPY/SPX chart
In this case ,we are using a 5 min chart, but the calculations are made on a 15 min heikin ashi chart for the PSAR and then on 5 min chart we plot the results.
At the same time we are conditioning the entry to be base on a time/session for daytrading/scalper mentality
In this case we only enter within the first 30 min of SPY opening session , and then we exit after 3-4 hours of staying in the position ( unless we hit a reverse condition).
For long condition we enter when the mtf ha candle close is above the mtf psar and for short condition we enter when the mtf ha candle close is below the mtf psar
This script is made with an educational purpose to show the power of multiple time frame approach compared to a single chart.
If you have any questions, let me know !
Supertrend with TP by Furkan SancuSimple Supertrend strategy with Take Profit levels.
Note: Make sure TP amounts add up to 100.
Opens a position with Supertrends strategy then adds Take Profit points with certain amounts of current position.
Big Snapper Alerts R3.0 + Chaiking Volatility condition + TP RSI//@version=5
//
// Bannos
// #NotTradingAdvice #DYOR
// Disclaimer.
// I AM NOT A FINANCIAL ADVISOR.
// THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
// ALWAYS DO YOUR OWN RESEARCH
//
// Author: Adaptation from JustUncleL Big Snapper by Bannos
// Date: May-2022
// Version: R1.0
//Description of this addon - Script using several new conditions to give Long/short and SL levels which was not proposed in the Big Snapper strategy "Big Snapper Alerts R3.0"
//"
//This strategy is based on the use of the Big Snapper outputs from the JustUncleL script and the addition of several conditions to define filtered conditions selecting signal synchrones with a trend and a rise of the volatility.
//Also the strategy proposes to define proportional stop losses and dynamic Take profit using an RSI strategy.
// After delivering the temporary ong/short signal and ploting a green or purple signal, several conditions are defined to consider a Signal is Long or short.
//Let s take the long signal as example(this is the same process with the opposite values for a short).
//step 1 - Long Definition:
// Snapper long signal stored in the buffer variable Longbuffer to say that in a close future, we could have all conditions for a long
// Now we need some conditions to combine with it:
//the second one is to be over the Ma_medium(55)
//and because this is not selective enough, the third one is a Volatility indicator "Chaikin Volatility" indicator giving an indication about the volatility of the price compared to the 10 last values
// -> Using the volatility indicator gives the possibility to increase the potential rise if the volatility is higher compared to the last periods.
//With these 3 signals, we get a robust indication about a potential long signal which is then stored in the variable "Longe"
//Now we have a long signal and can give a long signal with its Stop Loss
// The Long Signal is automatically given as the 3 conditions above are satisfied.
// The Stop loss is a function of the last Candle sizes giving a stop below the 70% of the overall candle which can be assimilated to a Fibonacci level. Below this level it makes sense to stop the trade as the chance to recover the complete Candle is more than 60%
//Now we are in an open Long and can use all the mentioned Stop loss condition but still need a Take Profit condition
//The take profit condition is based on a RSI strategy consisting in taking profit as soon as the RSI come back from the overbought area (which is here defined as a rsi over 70) and reaching the 63.5 level to trigger the Take Profit
//This TP condition is only active when Long is active and when an entry value as been defined.
//Entry and SL level appreas as soon as a Long or short arrow signal does appears. The Take profit will be conidtioned to the RSI.
//The final step in the cycle is a reinitialization of all the values giving the possibility to detect and treat any long new signal coming from the Big Snapper signal.
QQE MOD + SSL Hybrid + Waddah Attar ExplosionTRADE CONDITIONS
Long entry:
QQE Mod changes to Blue (leading indicator)
SSL Hybrid is Blue and price is above MA Channel line
Waddah Attar Explosion is Green and above Explosion line
Short entry:
QQE Mod changes to Red (leading indicator)
SSL Hybrid is Red and price is below MA Channel line
Waddah Attar Explosion is Red and above Explosion line
Risk management:
Each trade risks 2% of account (configurable in settings)
SL size determined by swing low/high of previous X candles (configurable in settings)
TP is triggered on SSL Hybrid EXIT arrow signals
TIPS
Timeframe: Personally I've found best results running this on 1H timeframe.
Note: To help visual identification of trade entries and exits you may wish to add the SSL Hybrid and Waddah Attar Explosion to the chart separately. They are being used to determine trade entry/exit within the code of this strategy but it was not possible to display them in a clear way within a single panel. Make sure you set the settings of the auxiliary indicators to match what is in the settings of this indicator if you do decide to add them.
CREDITS
QQE MOD byMihkel00
SSL Hybrid by Mihkel00
Waddah Attar Explosion by shayankm
BB + RSI double strategy developeI'm Korean, and it may not be enough to explain this script in English. I feel sorry for the users of TradingView for this lack of English skills. If you are Korean, please return it to the translator using Papago. It will be a useful manual for you.
This script referenced Chartart's Double Strategy. But there are some changes in his script.
0. Basically, when you break through the top or bottom of the 100th period balliser band and come back into the band, you track the overbuying and overselling of the RSI to determine your position entry. The order is triggered only when both conditions are satisfied at the same time. However, only one condition applies to clearing the position. This is because it is most effective in reducing risk and increasing assets in terms of profit and loss.
1. This script is optimized for 15 minutes of bitcoin futures chart and API via webbook alert. By default, 10x leverage usage and 10 pyramids are applied.
2. Setting a chart period other than 15 minutes will not guarantee sufficient effectiveness. It can also be applied to Ethereum , but it is not recommended to apply to other symbols.
3. I added Enable Date Filter because Chartart's script could not apply the strategy to the user's desired period. This feature allows you to set a period of time when you do not want to use the strategy. You can also uncheck it if you don't want to fully use this feature. Please remember that it is an exclusion period, not a usage period. With this feature, we can see the effectiveness of the strategy from a point in time, not from the entire period. You can also clearly differentiate the effectiveness of the strategy from the point you use it.
4. You can also stop using strategies at certain times of the day when you don't want to apply them. This works similarly to the Enalbe Date Filter described above. This allows you to sleep comfortably even if you don't fully trust this strategy.
5. The period, overbuying, and overselling figures of RSI can be set individually. For example, when you take a long position, you can set the RSI to a period of 7, and at the same time, the RSI entering the short position can be set to a period of 14. You can also set the base figures for overbuying and overselling to levels that you think are reasonable. This figure works in conjunction with the Bollinger Band and affects position entry when it is crossed or returned.
6. Based on API futures trading, basic Sleepy and commission are applied. This is geared towards market price transactions. This makes your revenue look more reasonable.
Thank you very much, Chartart. You are a genius.
-
저는 한국인이고, 영어로 이 스크립트를 설명하는 것이 어렵기 때문에 설명이 부족할 수 있습니다. 이런 영어 능력 부족에 대해서 TradingView 사용자들에게 미안하게 생각합니다. 만약 당신이 한국인이라면 파파고를 사용하여 번역기에 돌려주십시오. 당신에게 유익한 설명서가 될 것입니다.
이 스크립트는 Chart art의 Double Strategy를 참조했습니다. 그러나 그의 스크립트에서 달라진 점이 몇 가지 있습니다.
0. 기본적으로 100기간의 볼린져밴드의 상단 또는 하단을 돌파한 뒤 다시 밴드 안으로 들어올 때 RSI의 과매수, 과매도를 추적하여 포지션 진입을 결정합니다. 두 가지 조건이 동시에 만족되어야만 주문이 트리거 됩니다. 그러나 포지션을 청산하는 것에는 볼린져밴드 하나의 조건만 적용합니다. 여러가지 테스트를 거친 결과 이것이 손익 면에서 가장 효과적으로 리스크를 줄이고 자산을 늘리는 것에 효율적이기 때문입니다.
1. 이 스크립트는 15분의 비트코인 선물 차트와 webhook alert을 통한 API에 최적화되어 있습니다. 기본적으로 10배의 레버리지 사용과 10개의 피라미딩이 적용되어 있습니다.
2. 15분 외에 다른 차트 기간을 설정한다면 충분한 효과를 보장할 수 없습니다. 또한 이더리움에도 적용할 수 있지만, 그 외에 다른 심볼에는 적용하지 않는 것을 권장합니다.
3. Chart art의 스크립트는 전략을 사용자가 원하는 기간에 적용할 수 없었기 때문에, 저는 Enable Date Filter를 추가하였습니다. 이 기능을 통해 전략 사용을 원하지 않는 기간을 설정할 수 있습니다. 또한 이 기능을 완전히 사용하고싶지 않다면 체크를 해제할 수 있습니다. 사용 기간이 아닌 제외 기간인 점을 상기하시길 바랍니다. 이 기능을 통해 우리는 전체 기간이 아닌 가까운 특정 시점부터의 전략 적용 효과를 확인할 수 있습니다. 또한 사용자가 전략을 사용한 시점부터의 효과를 명백히 구분할 수 있습니다.
4. 또한 사용자가 적용을 원하지 않는 하루 중의 특정 시간대에 전략 사용을 멈출 수도 있습니다. 이는 위에 설명한 Enalbe Date Filter와 유사하게 작동합니다. 이를 통해 당신이 온전히 이 전략을 신뢰하지 못하여도 당신은 마음 편하게 잠에 들 수 있습니다.
5. RSI의 기간 및 과매수, 과매도 수치를 개별적으로 설정할 수 있습니다. 예를 들어 당신이 롱 포지션을 취할 때에는 RSI를 7의 기간으로 설정할 수 있고, 동시에 숏 포지션을 진입하는 RSI는 14의 기간으로 설정될 수 있습니다. 또한 과매수 및 과매도의 기준 수치를 당신이 합리적이라고 생각하는 수준으로 설정할 수 있습니다. 이 수치는 볼린져밴드와 함께 작동하여 그것을 넘어서거나 다시 되돌아올 때 포지션 진입에 영향을 미칩니다.
6. API 선물거래를 기준으로 하여 기본적인 슬리피지와 커미션이 적용되어있습니다. 이는 시장가 거래에 맞춰져 있습니다. 이는 당신의 수익을 좀 더 합리적인 수치로 보일 수 있게 합니다.
Chartart에게 특별히 감사합니다. 당신은 천재입니다.
EMA bands + leledc + bollinger bands trend following strategy v2The basics:
In its simplest form, this strategy is a positional trend following strategy which enters long when price breaks out above "middle" EMA bands and closes or flips short when price breaks down below "middle" EMA bands. The top and bottom of the middle EMA bands are calculated from the EMA of candle highs and lows, respectively.
The idea is that entering trades on breakouts of the high EMAs and low EMAs rather than the typical EMA based on candle closes gives a bit more confirmation of trend strength and minimizes getting chopped up. To further reduce getting chopped up, the strategy defaults to close on crossing the opposite EMA band (ie. long on break above high EMA middle band and close below low EMA middle band).
This strategy works on all markets on all timeframes, but as a trend following strategy it works best on markets prone to trending such as crypto and tech stocks. On lower timeframes, longer EMAs tend to work best (I've found good results on EMA lengths even has high up to 1000), while 4H charts and above tend to work better with EMA lengths 21 and below.
As an added filter to confirm the trend, a second EMA can be used. Inputting a slower EMA filter can ensure trades are entered in accordance with longer term trends, inputting a faster EMA filter can act as confirmation of breakout strength.
Bar coloring can be enabled to quickly visually identify a trend's direction for confluence with other indicators or strategies.
The goods:
Waiting for the trend to flip before closing a trade (especially when a longer base EMA is used) often leaves money on the table. This script combines a number of ways to identify when a trend is exhausted for backtesting the best early exits.
"Delayed bars inside middle bands" - When a number of candle's in a row open and close between the middle EMA bands, it could be a sign the trend is weak, or that the breakout was not the start of a new trend. Selecting this will close out positions after a number of bars has passed
"Leledc bars" - Originally introduced by glaz, this is a price action indicator that highlights a candle after a number of bars in a row close the same direction and result in greatest high/low over a period. It often triggers when a strong trend has paused before further continuation, or it marks the end of a trend. To mitigate closing on false Leledc signals, this strategy has two options: 1. Introducing requirement for increased volume on the Leledc bars can help filter out Leledc signals that happen mid trend. 2. Closing after a number of Leledc bars appear after position opens. These two options work great in isolation but don't perform well together in my testing.
"Bollinger Bands exhaustion bars" - These bars are highlighted when price closes back inside the Bollinger Bands and RSI is within specified overbought/sold zones. The idea is that a trend is overextended when price trades beyond the Bollinger Bands. When price closes back inside the bands it's likely due for mean reversion back to the base EMA in which this strategy will ideally re-enter a position. Since the added RSI requirements often make this indicator too strict to trigger a large enough sample size to backtest, I've found it best to use "non-standard" settings for both the bands and the RSI as seen in the default settings.
"Buy/Sell zones" - Similar to the idea behind using Bollinger Bands exhaustion bars as a closing signal. Instead of calculating off of standard deviations, the Buy/Sell zones are calculated off multiples of the middle EMA bands. When trading beyond these zones and subsequently failing back inside, price may be due for mean reversion back to the base EMA. No RSI filter is used for Buy/Sell zones.
If any early close conditions are selected, it's often worth enabling trade re-entry on "middle EMA band bounce". Instead of waiting for a candle to close back inside the middle EMA bands, this feature will re-enter position on only a wick back into the middle bands as will sometimes happen when the trend is strong.
Any and all of the early close conditions can be combined. Experimenting with these, I've found can result in less net profit but higher win-rates and sharpe ratios as less time is spent in trades.
The deadly:
The trend is your friend. But wouldn't it be nice to catch the trends early? In ranging markets (or when using slower base EMAs in this strategy), waiting for confirmation of a breakout of the EMA bands at best will cause you to miss half the move, at worst will result in getting consistently chopped up. Enabling "counter-trend" trades on this strategy will allow the strategy to enter positions on the opposite side of the EMA bands on either a Leledc bar or Bollinger Bands exhaustion bar. There is a filter requiring either a high/low (for Leledc) or open (for BB bars) outside the selected inner or outer Buy/Sell zone. There are also a number of different close conditions for the counter-trend trades to experiment with and backtest.
There are two ways I've found best to use counter-trend trades
1. Mean reverting scalp trades when a trend is clearly overextended. Selecting from the first 5 counter-trend closing conditions on the dropdown list will usually close the trades out quickly, with less profit but less risk.
2. Trying to catch trends early. Selecting any of the close conditions below the first 5 can cause the strategy to behave as if it's entering into a new trend (from the wrong side).
This feature can be deadly effective in profiting from every move price makes, or deadly to the strategy's PnL if not set correctly. Since counter-trend trades open opposite the middle bands, a stop-loss is recommended to reduce risk. If stop-losses for counter-trend trades are disabled, the strategy will hold a position open often until liquidation in a trending market if th trade is offsides. Note that using a slower base EMA makes counter-trend stop-losses even more necessary as it can reduce the effectiveness of the Buy/Sell zone filter for opening the trades as price can spend a long time trending outside the zones. If faster EMAs (34 and below) are used with "Inner" Buy/Zone filter selected, the first few closing conditions will often trigger almost immediately closing the trade at a loss.
The niche:
I've added a feature to default into longs or shorts. Enabling these with other features (aside from the basic long/short on EMA middle band breakout) tends to break the strategy one way or another. Enabling default long works to simulate trying to acquire more of the asset rather than the base currency. Enabling default short can have positive results for those high FDV, high inflation coins that go down-only for months at a time. Otherwise, I use default short as a hedge for coins that I hold and stake spot. I gain the utility and APR of staking while reducing the risk of holding the underlying asset by maintaining a net neutral position *most* of the time.
Disclaimer:
This script is intended for experimenting and backtesting different strategies around EMA bands. Use this script for your live trading at your own risk. I am a rookie coder, as such there may be errors in the code that cause the strategy to behave not as intended. As far as I can tell it doesn't repaint, but I cannot guarantee that it does not. That being said if there's any question, improvements, or errors you've found, drop a comment below!
Pivot Moving Average steteggythis Pivot Moving Average steteggy works best on a chart --->>Above 100$ crypto
Sniper is very profitable in terms of% good trades
It will perform very well on 1-5X Leverage (Solid leverage, not variable depending on the volume )
TP: 0.9 %
SL : 5.5 %
Rudy's BB with MartingaleMy first strategy script that uses Bollinger Bands and Martingale to increase contract size after negative profit.
Compound strategyIn this strategy, I looked at how to manage the crypto I bought. Once we have a little understanding of how cryptocurrency is valued, we can manage the coins we have. For example, the most valuable coin in a coin is to sell when it is overvalued and re-buy when it is undervalued. Furthermore, I realised that buying from the right place and selling at the right time is very important to make a good profit. When it says sell, it's divided into several parts.
1. When the major uptrend is over and we are able to make the desired profit, we will sell our holdings outright.
2. Selling in the middle of a down trend and buying less than that amount again
3. When a small uptrend is over, sell the ones you bought at a lower price and make a small profit.
The other important thing is that the average cost is gradually reduced. Also, those who sell at a loss will reduce their profit (winning rate), so knowing that we will have a chance to calculate our loss and recover it. I used this to write a strategy in Trading View. I have put the link below it. From that we can see how this idea works. What I did was I made the signal by taking some technical indicators as I did in the previous one (all the indicators I got in this case were directional indicators, then I was able to get a good correlation and a standard deviation. I multiplied the correlation and the standard deviation by both and I took the signal as the time when the graph went through zero, and I connected it to the volume so that I could see some of the volume supported by it.)
Now let me tell you a little bit about what I see in this strategy. In this I used the compound effect. That is, the strategy, the profit he takes to reinvest. On the other hand, the strategy itself can put a separate stop loss value on each trade and avoid any major loss from that trade. I also added to this strategy the ability to do swing trading. That means we can take the small profits that come with going on a big up trend or a big down trend. Combined with Compound Effect, Stop Loss and Swing Trading, I was able to make a profit of 894% per annum (1,117.62% for 15 months) with a winning rate of 80%. Winning rate dropped to 80% because I added stop loss and swing trading. The other thing is that I applied DCA to this in both the up trend and the down trend (both). That was another reason for me to make a good profit. The orange line shows how to reduction of costly trade. The yellow line shows the profit and you can see that the profit line does not go down during the loss trades. That's because I want to absorb the loss from that trade.
I11L OIL BotThe System makes use of the Bolinger Bands strategy from TradingView and implements simple Money Management Rules like SL and TP.
You can adjust the following Parameters:
Leverage: Leverage.
Risk Capital per Trade: The amount you are willing to lose per Trade, keep in mind that changes in Leverage should follow changes in Risk Capital.
TP_Factor: Default is 2:1 Risk:Reward, you might want to adjust this according to the underlying market.
InvertBuyLogic: Inverts the Logic of the System, important for checking if you have a true performance advantage from using the System. I look for a flat looking Curve in the wrong mode.
LookbackDistance: The distance your standart Deviation is refering to. A Lookback Distance too big might result in very few signals.
DevMult: We only want outliers, so we multiply our standart Deviation Bands by a Factor.
MadriEsta estrategia fue creada por mi, basándose en el indicador bollinger bands+rsi y una ema , forexstrategiesresources me lo pasó a codigo y despues fue publicado en ChartArt y en la pagina web de forexstrategiesresources.
Ahora este script lo he modificado para optimizarlo para BTC /USDT en la temporalidad de 1 hora, os invito a ir cambiando temporalidades y valores para conseguir la mayor rentabilidad y, al igual que yo lo publico en codigo abierto os invito a que pongáis vuestros ajustes en los comentarios.
Los ajustes que se pueden cambiar para buscar mayor rentabilidad son en primer lugar "lo que se puede cambiar desde el mismo grafico" los valores "A" y "B".
Además, en el codigo el valor "RSIoverSold" y el "RSIoverBought" por mi experencia con menos de 30 no suele ir bien y con mas de 70 tampoco, el rango adecuado es de 29 a 49, incluidos.
Yo no he trasteado mucho pero también os invito a cambiar la fuente de entrada de "close" a "high", "open", "low"...
Recomiendo para la configuración ACTUAL mismo símbolo, mismos valores operar las señales Short cuando el precio este por debajo de la EMA de 900 y operar las Long cuando este por encima.
En otros símbolos la cosa cambia, hay que adaptarlo a cada cosa.