Strength Volatility Killer - The Quant ScienceStrength Volatility Killer - The Quant Science™ is based on a special version of RSI (Relative Strength Index), created with the simple average and standard deviation.
DESCRIPTION
The algorithm analyses the market and opens positions following three different volatility entry conditions. Each entry has a specific and personal exit condition. The user can setting trailing stop loss from user interface.
USER INTERFACE SETTING
Configures the algorithm from the user interface.
AUTO TRADING COMPLIANT
With the user interface, the trader can easily set up this algorithm for automatic trading.
BACKTESTING INCLUDED
The trader can adjust the backtesting period of the strategy before putting it live. Analyze large periods such as years or months or focus on short-term periods.
NO LIMIT TIMEFRAME
This algorithm can be used on all timeframes.
GENERAL FEATURES
Multi-strategy: the algorithm can apply long strategy or short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated indicator: indicator is included.
Backtesting included: quickly automatic backtesting of the strategy.
Auto-trading compliant: functions for auto trading are included.
ABOUT BACKTESTING
Backtesting refers to the period 13 June 2022 - today, ticker: AVAX/USDT, timeframe 5 minutes.
Initial capital: $1000.00
Commission per trade: 0.03%
Mean
Mean Reverse Grid Algorithm - The Quant ScienceMean Reverse Grid Algorithm - The Quant Science™ is a dynamic grid algorithm that follows the trend and run a mean reverting strategy on average percentage yield variation.
DESCRIPTION
Trades on different price levels of the grid, following the trend. The grid consists of 10 levels, 5 higher and 5 lower. The grids together create a channel, this channel represents the total percentage change where the algorithm works. The channel also represents the average change yields of the asset, identified during analysis with the "Yield Trend Indicator".
The algorithm can be set long or short.
1. Long algorithm: opens long positions with 20% of the capital every time the price crossunder a lower grid, for a maximum total of 5 simultaneous trades. Trades are closed each time the price crossover a higher grid.
2. Short algorithm: opens short positions with 20% of the capital every time the price crossover a higher grid, for a maximum total of 5 simultaneous trades. Trades are closed each time the price crossunder a lower grid.
USER INTERFACE SETTING
The user configures the percentage value of each grid from the user interface.
AUTO TRADING COMPLIANT
With the user interface, the trader can easily set up this algorithm for automatic trading. Automating it is very simple, activate the alert functions and enter the links generated by your broker.
BACKTESTING INCLUDED
With the user interface, the trader can adjust the backtesting period of the strategy before putting it live. You can analyze large periods such as years or months or focus on short-term periods.
NO LIMIT TIMEFRAME
This algorithm can be used on all timeframes and is ideal for lower timeframes.
GENERAL FEATURES
Multi-strategy: the algorithm can apply either the long strategy or the short strategy.
Built-in alerts: the algorithm contains alerts that can be customized from the user interface.
Integrated grid: the grid indicator is included.
Backtesting included: automatic backtesting of the strategy is generated based on the values set.
Auto-trading compliant: functions for auto trading are included.
ABOUT BACKTESTING
Backtesting refers to the period 1 August 2022 - today, ticker: ETH/USDT, timeframe 1H.
Initial capital: $1000.00
Commission per trade: 0.03%
Algorithmic Trading on ETH/USDT 1H Backtesting Strategy How it works
%VARonMeanLongOnly is a long-only strategy that uses the average and price movement to find buying opportunities. The script takes into account the simple average over a longer timeframe than the observed timeframe. It then calculates the distance between point "X" (average) and point "Y" (market price). The algorithm will buy every time the price is lower than the average and has a percentage variation greater than the set one. So every time the price moves away from the average by XY% a long position will be opened. The position is closed only when a specific percentage distance of the price above the average is reached, without the use of stop losses and take profits.
This strategy is inspired by the classic academic mean and standard deviation approach , according to which the market tends to move around average values, which may deviate from the average for short periods. In this strategy the trader tries to find a statistical advantage over the distances between average and price.
%VARonMeanLongOnly is a very lightweight script created with Pine v5. We developed a user interface that can adjust the analysis period from a few days to several years. We chose the Moving Average Multi Time Frame and a simple mathematical expression to calculate the percentage distance from price to average and vice versa.
What can you do with %VARonMeanLongOnly ?
With %VARonMeanLongOnly you can implement a statistical arbitrage strategy that allows you to understand if buying above the average and selling the asset above the average can be profitable for a given market. Using the interface you can adjust the periods and variations and analyse if there is a possibility to use this strategy on that market. Understand if this approach has produced positive results on the market under analysis in the past.
The initial capital set is €1,000 (You can change this from the "Properties" section of the user interface).
Each individual trade uses 100% of the set capital, in this case €1,000.
The default commission per trade is 0.03% (You can change this in the "Properties" section of the user interface).
User Interface
1) General backtest time settings: Set the history period to be analysed
StartDate: backtest start date
StartMonth: backtest start month
StartYear: backtest start year
EndDate: backtest end day
EndMonth: backtest end month
EndYear: backtest end year
2) Mean Setting
Length: Periods to be observed when calculating the average
Source: Open, Close, High, Low
TimeFrame: Time frame of the average (usually larger than the time frame under observation)
3) Entry Long Trades:
EntryOnPercentVar: % distance from average to current price
4) Exit Long Trades:
ExitOnPercentVar: % distance from the current price to the average
Please do not hesitate to contact us for any questions or information.
Disclaimer
Be careful, the past is not a guarantee of future performance, so remember to use the script as a pure analysis tool. The developer takes no responsibility for any use other than research and analysis and can in no way be held liable for damages resulting from wrong use of this code.
ETF 3-Day Reversion StrategyIntroduction: This strategy is a modification of the “3-day Mean Reversion Strategy” from the book "High Probability ETF Trading" by Larry Connors and Cesar Alvarez. In the book, the authors discuss a high-probability ETF mean reversion strategy for a 1-day time-frame with these simple rules:
The price must be above the 200 day SMA and below the 5 day SMA.
The low of today must be lower than the low of yesterday (must be true for 3 consecutive days)
The high of today must be lower than the high of yesterday (must be true for 3 consecutive days)
If the 3 rules above are true, then buy on the close of the current day.
Exit when the closing price crosses above the 5 day SMA.
In practice and in backtesting, I’ve found that the strategy consistently works better when using an EMA for the trend-line instead of an SMA. So, this script uses an EMA for the trend-line. I’ve also made the length of the exit EMA adjustable.
How it works:
The Strategy will buy when the buy conditions above are true. The strategy will sell when the closing price crosses over the Exit Moving Average
Plots:
Green line = Exit Moving Average (Default 5 Day EMA)
Blue line = 5 Day EMA (Used as Entry Criteria)
Disclaimer: 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!
[cache_that_pass] 1m 15m Function - Weighted Standard DeviationTradingview Community,
As I progress through my journey, I have come to the realization that it is time to give back. This script isn't a life changer, but it has the building blocks for a motivated individual to optimize the parameters and have a production script ready to go.
Credit for the indicator is due to @rumpypumpydumpy
I adapted this indicator to a strategy for crypto markets. 15 minute time frame has worked best for me.
It is a standard deviation script that has 3 important user configured parameters. These 3 things are what the end user should tweak for optimum returns. They are....
1) Lookback Length - I have had luck with it set to 20, but any value from 1-1000 it will accept.
2) stopPer - Stop Loss percentage of each trade
3) takePer - Take Profit percentage of each trade
2 and 3 above are where you will see significant changes in returns by altering them and trying different percentages. An experienced pinescript programmer can take this and build on it even more. If you do, I ask that you please share the script with the community in an open-source fashion.
It also already accounts for the commission percentage of 0.075% that Binance.US uses for people who pay fees with BNB.
How it works...
It calculates a weighted standard deviation of the price for the lookback period set (so 20 candles is default). It recalculates each time a new candle is printed. It trades when price lows crossunder the bottom of that deviation channel, and sells when price highs crossover the top of that deviation channel. It works best in mid to long term sideways channels / Wyckoff accumulation periods.
Hophop Reversion Strategy
█ OVERVIEW
Mean reversion is a financial term assuming that an asset's price will tend to converge to the average price over time.
Due to the trending nature of the crypto markets, mean reversion on a high timeframe could be pretty dangerous. When it comes to running mean reversion strategy on low timeframe, commission and slippage may cost more than strategy gains.
In this strategy, I tried to achieve being conservative in the trending market while avoiding trades if necessary and trading high probability reversion opportunities .
█ CONCEPTS
Strategy is build based on the combination of the momentum and the historical / implied volatility; when the price exceeds the potential volatility range, the strategy places the orders, and the target point is the mean of the expected range high and range low.
The range low and high lines displayed on the chart shows where to short or long, to make sure that the orders are limit orders; orders are placed 0.5% above/below the ranges!
Key information about the strategy
• All the orders are limit entry
• 0.02% commission is included in the backtest
• 30 ticks set for Verify Price Limit for Orders
• 30 ticks set for Slippage
• Initial version does not include the money management and hard stops hence you need to be extra cautious in trending markets
• Restricted to be used for BTC and ETH for 15 min timeframe
█ Ozet
Ortalamaya dönme, bir varlığın fiyatının zaman içinde ortalama fiyata yakınsama eğiliminde olacağını varsayan bir finansal terimdir.
Kripto piyasalarının trend egilimli doğası nedeniyle, yüksek zaman diliminde ortalamaya dönüş oldukça tehlikeli olabilir.
Ortalama geri dönüş stratejisini düşük zaman diliminde calistirmak söz konusu olduğunda, komisyon ve kayma, strateji kazanımlarından daha pahalıya mal olabilir.
Bu stratejide, gerektiğinde alım satımlardan kaçınırken ve yüksek olasılıklı ortalamaya dönüş fırsatlarını degerlendiren, trend olan piyasada ise isleme girerken temkinli olmasi uzerine calistim
█ Aciklama
Strateji, momentum ve tarihsel / zımni oynaklığın birleşimine dayalı olarak inşa edilmistir; fiyat potansiyel oynaklık aralığını aştığında, strateji emirleri verir ve hedef nokta, beklenen yüksek aralığın ve düşük aralığın ortalamasıdır.
Grafikte görüntülenen aralık alt ve üst satırları,
Stratejiye ait onemli bilgiler/b]
• Tüm emirler limit emirdir girişlidir
• Backtest performansinda %0.02 komisyon dahildir
• Limit Emir fiyat dogrulamasi icin 30 tick bekleme kullanilmistir
• Slippage için 30 tick bekleme kullanilmistir
• İlk sürüm para yönetimini ve stoploss içermez, bu nedenle trend olan piyasalarda ekstra dikkatli olmanız gerekir.
• 15 dakikalık zaman dilimi ile BTC ve ETH için kullanımla sınırlıdır
Emirlerin limit emir olduğundan emin olmak için nerede short veya long isleme girilecegini gosteren cizgilerin %0.5 üstünde/altında verilir!
Jaws Mean Reversion [Strategy]This very simple strategy is an implementation of PJ Sutherlands' Jaws Mean reversion algorithm. It simply buys when a small moving average period (e.g. 2) is below
a longer moving average period (e.g. 5) by a certain percentage and closes when the small period average crosses over the longer moving average.
If you are going to use this, you may wish to apply this to a range of investment assets using a screener for setups, as the amount signals are low. Alternatively, you may wish to tweak the settings to provide more signals.
Context can be found here:
LINK
Mean Reversion w/ Bollinger BandsThis is a more advanced version of my original mean reversion script.
It employs the famous Bollinger Bands.
This robot will buy when price falls below the lower Bollinger Band, and sell when price moves above the upper Bollinger Band.
I've only tested it on the S&P 500, though you could try it out on other assets to see the backtest performance.
During the recent COVID-19 bear market drop, it produced several buy signals on the S&P which I followed, and made some nice gains so far.
I still think this would make a better investing strategy (buy undervalued / sell over-valued), rather than a trading strategy.
I use this robot for my long term portfolio.
YJ Mean ReversionMean reversion strategy, based upon the price deviation (%) from a chosen moving average (bars). Do note that the "gains" are always relative to your starting capital, so if you set a smaller starting capital (e.g. $10000) your gains will look bigger. Also when the strategy tester has finished calculating, check the "Open P/L", as there could still be open trades.
Some Tips:
- Was designed firstly to work on an index like the S&P 500 , which over time tends to go up in value.
- Avoid trading too frequently (e.g. Daily, Weekly), to avoid getting eaten by fees.
- If you change the underlying asset, or time frame, tweaking the moving average may be necessary.
- Can work with a starting capital of just $1000, optimise the settings as necessary.
- Accepts floating point values for the amount of units to purchase (e.g. Bitcoin ).
- If price of units exceeds available capital, script will cancel the buy.
- Adjusted the input parameters to be more intuitive.
MCI and VCI - Modified CCI FormulasFor private peeps only
- Takes a modified version of the CCI formula into 2 parts
VCI - Volume Channel Index (Yellow Histogram)
- Measures accurate accumulation and distribution levels and times
MCI - Modified Channel Index
- Measures (when compared to VCI) levels where clearly buys are interested vs not interested.
Example:
If VCI > MCI
- Shows buyer's are more than interested in buying, you've either hit a bottom or heavy resistance
if MCI > VCI
- Show's buyer's aren't interested and will most likely result in a dump/lower price
Great for monitoring accumulation and distribution, these auto buy and sells look for the transition points over 0, works on EVERY commodity/stock/FOREX/Crypto
Results are from trading 1 BTC x25 leveraging. Not all trades will get in if put in at limit, but it does survive with profits after the massive 0.075 fee (results shown are after fees)
Nick's Momentum Trading Strategy - Beats Buy and Hold manifolds!This script works on the principle of short-term mean reversion and long term trend following, and uses minimal parameters to ensure no overfitting.
The scripts beats buy and hold for almost all major pairs that satisfy the following conditions:
- are trading on multiple exchanges as either ALTBTC or ALTUSD pairs
- have good volume available with them
- have an established history - (try not to use this script with really new pairs)
To run the script, follow these rules:
- script should be run on ALTBTC pair
- set first parameter such that when multiplied with resolution of chart, we get a whole day/week/month, etc. e.g. for a '4H' chart, set this to multiples of 6. The reason being that most algorithmic rebalancing in cryptosphere happens at these times, and we want to make effective use of this.
- set second parameter in the range of 1-6 - this is the smoothing factor (ema) we want to apply to our indicator (governed by our first parameter) - more smoothing = lesser trades. See what works for you.
- Last parameter is a filter condition. Just check/uncheck it once to see if market works better with this on or off.
- If script does not beat buy and hold on this pair (rarely), don't use script on this pair at all.
Access available only to friends. I do code trading strategies on request - so, let me know if you have a good set of rules to create a strategy.
Moving Average Mean Reversion StrategyA basic mean-reversion strategy. Shorts when the close is 10% above the MA, and goes long when it's 10% below the MA.
EMA, SMA Mean ReversionInvite Only: But everyone will be accepted
Invite-only in order to understand demand and interest in this type of strategy. All requests are welcome and will be accepted.
Full Source is available
A blog post containing full source code and commentary of the strategy is available on the backtest-rookies website. To comply with house rules, I cannot post a direct link here. (Hint add ".com" to backtest-rookies)
Overview
The strategy uses two moving averages to represent the historical mean and a slightly smoothed version of the current price action. It will place long or short trades when the fast EMA moves far away from the historical mean (the slow SMA).
Features
Set Backtest Date ranges
Enter when EMA is x% away from the mean
Independent inputs for the long and short side
Only enter when the EMA has started to reverse. (Input)
Optional Stop loss
Limit trades to a single direction to "Buy the dip" or "Sell the top"