DMI StrategyThis strategy is based on DMI indicator. It helps me to identify base or top of the script. I mostly use this script to trade in Nifty bank options, even when the signal comes in nifty. It can be used to trade in other scripts as well. Pivot points can also be used to take entry. Long entry is taken when DI+(11) goes below 10 and DI-(11) goes above 40, whereas short entry is taken when DI-(11) goes below 10 and DI+(11) goes above 40.
For bank nifty, I take the trade in the strike price for which the current premium is nearby 300, with the SL of 20%. If premium goes below 10% I buy one more lot to average, but exit if the premium goes below 20% of the first entry. If the trade moves in the correct direction, we need to start trailing our stoploss or exit at the pre-defined target.
Please have a look at strategy tester to back test.
Indicators and strategies
RSI Mean Reversion StrategyThis is a scalping strategy designed to be used for crypto trading. It uses an Exponential Moving Average with a default length of 100 in order to identify the trend of the market. If the price is trading above 100, it will only take long trades, and vice versa for shorts. It places long orders when the RSI value closes below 40, and the price is also above the 100 EMA. It places short orders when the RSI value is above 60, and the price is below the 100 EMA.
*Note: for custom alert messages to be read, "{{strategy.order.alert_message}}" must be placed into the alert dialogue box when the alert is set.
VIDYA Trend StrategyOne of the most common messages I get is people reaching out asking for quantitative strategies that trade cryptocurrency. This has compelled me to write this script and article, to help provide a quantitative/technical perspective on why I believe most strategies people write for crypto fail catastrophically, and how one might build measures within their strategies that help reduce the risk of that happening. For those that don't trade crypto, know that these approaches are applicable to any market.
I will start off by qualifying up that I mainly trade stocks and ETFs, and I believe that if you trade crypto, you should only be playing with money you are okay with losing. Most published crypto strategies I have seen "work" when the market is going up, and fail catastrophically when it is not. There are far more people trying to sell you a strategy than there are people providing 5-10+ year backtest results on their strategies, with slippage and commissions included, showing how they generated alpha and beat buy/hold. I understand that this community has some really talented people that can create some really awesome things, but I am saying that the vast majority of what you find on the internet will not be strategies that create alpha over the long term.
So, why do so many of these strategies fail?
There is an assumption many people make that cryptocurrency will act just like stocks and ETFs, and it does not. ETF returns have more of a Gaussian probability distribution. Because of this, ETFs have a short term mean reverting behavior that can be capitalized on consistently. Many technical indicators are built to take advantage of this on the equities market. Many people apply them to crypto. Many of those people are drawn down 60-70% right now while there are mean reversion strategies up YTD on equities, even though the equities market is down. Crypto has many more "tail events" that occur 3-4+ standard deviations from the mean.
There is a correlation in many equities and ETF markets for how long an asset continues to do well when it is currently doing well. This is known as momentum, and that correlation and time-horizon is different for different assets. Many technical indicators are built based on this behavior, and then people apply them to cryptocurrency with little risk management assuming they behave the same and and on the same time horizon, without pulling in the statistics to verify if that is actually the case. They do not.
People do not take into account the brokerage commissions and slippage. Brokerage commissions are particularly high with cryptocurrency. The irony here isn't lost to me. When you factor in trading costs, it blows up most short-term trading strategies that might otherwise look profitable.
There is an assumption that it will "always come back" and that you "HODL" through the crash and "buy more." This is why Three Arrows Capital, a $10 billion dollar crypto hedge fund is now in bankruptcy, and no one can find the owners. This is also why many that trade crypto are drawn down 60-70% right now. There are bad risk practices in place, like thinking the martingale gambling strategy is the same as dollar cost averaging while also using those terms interchangeably. They are not the same. The 1st will blow up your trade account, and the 2nd will reduce timing risk. Many people are systematically blowing up their trade accounts/strategies by using martingale and calling it dollar cost averaging. The more risk you are exposing yourself too, the more important your risk management strategy is.
There is an odd assumption some have that you can buy anything and win with technical/quantitative analysis. Technical analysis does not tell you what you should buy, it just tells you when. If you are running a strategy that is going long on an asset that lost 80% of its value in the last year, then your strategy is probably down. That same strategy might be up on a different asset. One might consider a different methodology on choosing assets to trade.
Lastly, most strategies are over-fit, or curve-fit. The more complicated and more parameters/settings you have in your model, the more likely it is just fit to historical data and will not perform similar in live trading. This is one of the reasons why I like simple models with few parameters. They are less likely to be over-fit to historical data. If the strategy only works with 1 set of parameters, and there isn't a range of parameters around it that create alpha, then your strategy is over-fit and is probably not suitable for live trading.
So, what can I do about all of this!?
I created the VIDYA Trend Strategy to provide an example of how one might create a basic model with a basic risk management strategy that might generate long term alpha on a volatile asset, like cryptocurrency. This is one (of many) risk management strategies that can reduce the volatility of your returns when trading any asset. I chose the Variable Index Dynamic Average (VIDYA) for this example because it's calculation filters out some market noise by taking into account the volatility of the underlying asset. I chose a trend following strategy because regressions are capturing behaviors that are not just specific to the equities market.
The more volatile an asset, the more you have to back-off the short term price movement to effectively trend-follow it. Otherwise, you are constantly buying into short term trends that don't represent the trend of the asset, then they reverse and loose money. This is why I am applying a trend following strategy to a 4 hour chart and not a 4 minute chart. It is also important to note that following these long term trends on a volatile asset exposes you to additional risk. So, how might one mitigate some of that risk?
One of the ways of reducing timing risk is scaling into a trade. This is different from "doubling down" or "trippling down." It is really a basic application of dollar cost averaging to reduce timing risk, although DCA would typically happen over a longer time period. If it is really a trend you are following, it will probably still be a trend tomorrow. Trend following strategies have lower win rates because the beginning of a trend often reverses. The more volatile the asset, the more likely that is to happen. However, we can reduce risk of buying into a reversal by slowly scaling into the trend with a small % of equity per trade.
Our example "VIDYA Trend Strategy" executes this by looking at a medium-term, volatility adjusted trend on a 4 hour chart. The script scales into it with 4% of the account equity every 4-hours that the trend is still up. This means you become fully invested after 25 trades/bars. It also means that early in the trade, when you might be more likely to experience a reversal, most of your account equity is not invested and those losses are much smaller. The script sells 100% of the position when it detects a trend reversal. The slower you scale into a trade, the less volatile your equity curve will be. This model also includes slippage and commissions that you can adjust under the "settings" menu.
This fundamental concept of reducing timing risk by scaling into a trade can be applied to any market.
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!
R19 STRATEGYHello again.
Let me introduce you R19 Strategy I wrote for mostly BTC long/short signals
This is an upgrated version of STRATEGY R18 F BTC strategy.
I checked this strategy on different timeframes and different assest and found it very usefull for BTC 1 Hour and 5 minutes chart.
Strategy is basically takes BTC/USDT as a main indicator, so you can apply this strategy to all cryptocurrencies as they mostly acts accordingly with BTC itself (Of course you can change main indicator to different assets if you think that there is a positive corelation with. i.e. for BTC signals you can sellect DXY index for main indicator to act for BTC long/short signals)
Default variables of the inticator is calibrated to BTC/USDT 5 minute chart. I gained above %77 success.
Strategy simply uses, ADX, MACD, SMA, Fibo, RSI combination and opens positions accordingly. Timeframe variable is very important that, strategy decides according the timeframe you've sellected but acts within the timeframe in the chart. For example, if you're on the 5 minutes chart, but you've selected 1 hour for the time frame variable, strategy looks for 1 hour MACD crossover for opening a position, but this happens in 5 minutes candle, It acts quickly and opens the position.
Strategy also uses a trailing stop loss feature. You can determine max stoploss, at which point trailing starts and at which distance trailing follows. The green and red lines will show your stoploss levels according to the position strategy enters (green for long, red for short stop loss levels). When price exceeds to the certaing levels of success, stop loss goes with the profitable price (this means, when strategy opens a position, you can put your stop loss to the green/red line in actual trading)
You can fine tune strategy to all assets.
Please write down your comments if you get more successfull about different time zones and different assets. And please tell me your fine tuning levels of this strategy as well.
See you all.
tvbot Trend Following with Mean Reversion algoDefault settings are for the ETHUSDT 5 min Binance Chart regular candles.
Back test Default settings are 10,000 usd to start, Commission 0.075%, capital deployment per position is 10%, slippage value of 1.
This algo uses the EMA to set the trend line . You are also able to turn the trend line into a range instead of just a static line. The algo uses the VWMA to set the base entry parameters. When a candle closes above or below the VWMA it will record that price and then wait for the VWMA to meet the candle close price. When that happens the Base entry condition is met. (it causes the vwma to create a hook like structure. essentially tell you that the momentum has changed directions.)
The algo will always check to see if the trend line has either breached or has been tested and held. If this condition has been met it will then go to the base entry condition to check to see if the momentum has changed.
There is a mean reversion component in this algo as well. When the price has moved away from the mean(set by user) by a certain amount the algo will start to look for a top or bottom. Once that condition has been met it will then use the base entry condition to look for a change in momentum, but the mean reversion base entry condition uses the HMA to check for a change in momentum.
This algo effectively looks like a hamburger. Mean reversion being the tops and bottoms(bun) and the trend following(beef patty)
Bollinger Bands and RSI Short Selling (by Coinrule)The Bollinger Bands are among the most famous and widely used indicators. A Bollinger Band is a technical analysis tool defined by a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average ( SMA ) of a security's price, but which can be adjusted to user preferences. They can suggest when an asset is oversold or overbought in the short term, thus provide the best time for buying and selling it.
The relative strength index ( RSI ) is a momentum indicator used in technical analysis . RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI can do more than point to overbought and oversold securities. It can also indicate securities that may be primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.
The short order is placed on assets that present strong momentum when it's more likely that it is about to decrease further. The rule strategy places and closes the order when the following conditions are met:
ENTRY
The closing price is greater than the upper standard deviation of the Bollinger Bands
The RSI is less than 70
EXIT
The trade is closed in profit when the RSI is less than 70
Upper standard deviation of the Bollinger Band is greater than the the closing price.
This strategy comes with a stop loss and a take profit, and as you can see by the results, it is well suited for a bear market.
This trade works very well with ETH (1h timeframe), AVA (4h timeframe), and SOL (3h timeframe) and is backtested from the 1 December 2021 to capture how this strategy would perform in a bear market.
To make the results more realistic, the strategy assumes each order to trade 30% of the available capital. 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.
Strategy Myth-Busting #1 - UT Bot+STC+Hull [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 first one is an automated version of the " The ULTIMATE Scalping Trading Strategy for 2022 " strategy from " My Trading Journey " who claims to have achieved not only profits but a 98.3% win rate. As you can see from the backtest results below, I was unable to substantiate anything close to that that claim on the same symbol (NVDA), timeframe (5m) with identical instrument settings that " My Trading Journey " was demonstrating with. Strategy Busted.
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.
This strategy uses a combination of 3 open-source public indicators:
UT Bot Alerts by QuantNomad
STC Indicator - A Better MACD By shayankm
Basic Hull Ma Pack tinkered by InSilico
Trading Rules:
5 min candles
Long
New Buy Signal from UT Bot Alerts Strategy
STC is green and below 25 and rising
Hull Suite is green
Short
New Sell Signal from UT Bot Alerts Strategy
STC is red and above 75 and falling
Hull Suite is red
[MT Trader] Backtest template w/ Supertrend Strategy---EN: In this strategy template you will find some functions already pre-programmed to be used in your strategies to speed up the programming process, among them we can highlight the default stop loss and take profit functions, which will help to set easily and quickly, defining the price range in which we want to prevent large losses or protect our profits from unexpected market movements.
🔴 Stop Loss: Among the functions of the stop loss are the 4 most known, first we have the fixed percentage range (%) and price ($), when the price reaches this fixed price will limit the losses of the operation avoiding larger losses, then we have the average true range (ATR), a moving average of true range and X period that can give us good reference points to place our stop loss, finally the last point higher or lower is the most used by traders to place their stop loss.
In addition, the price range between the entry and stop loss can be converted into a trailing stop loss.
🟢 Take Profit: We have 3 options for take profit, just like stop loss, the fixed range of percentage(%) and price($), are available, in addition to this we have the 1:# ratio option, which multiplies by X number the range between the entry and stop loss to use it as take profit, perfect for strategies that use ATR or last high/low point for their strategy.
📈 Heikin Ashi Entrys: The heikin ashi entries are trades that are calculated based on heikin ashi candles but their price is executed in Japanese candles, thus avoiding the false results that occur in heikin candlestick charts, making that in certain cases better results are obtained in the strategies that are executed with this option compared to Japanese candlesticks.
📊 Dashboard: A more visual and organized way to see the results and data needed for our strategy.
Feel free to use this template to program your own strategies, if you find bugs or want to request a new feature let me know in the comments or through my telegram @hvert_mt
__________________________________________________________________________________________________________________________________________________
---ES: En esta plantilla de estrategia podrás encontrar algunas funciones ya pre-programadas para ser usadas en tus estrategias para acelerar procesos de programación, entre ellas podemos destacar las funciones por defecto de stop loss y take profit, que ayudaran a establecer de manera fácil y rápida, definiendo los rango de precio en los que queremos prevenirnos de perdidas grandes o proteger nuestras ganancias de movimientos inesperados del mercado.
🔴 Stop Loss: Entre las funciones del stop loss están las 4 más conocidas, en primer lugar tenemos el rango de porcentaje fijo(%) y el precio($), cuando el precio alcance este precio fijo se limitaran las perdidas de la operación evitando perdidas mas grandes, después tenemos el promedio de rango verdadero(ATR), una media móvil del rango verdadero y X periodo que nos puede dar buenos puntos de referencia para colocar nuestro stop loss, por ultimo el ultimo punto mas alto o mas bajo es de los mas usados por los traders para colocar su stop loss.
Adicional a esto, el rango de precio entre la entrada y el stop loss se puede convertir en un trailing stop loss.
🟢 Take Profit: Tenemos 3 opciones para take profit, al igual que en el stop loss, el rango fijo de porcentaje(%) y precio($) se encuentran disponibles, adicional a esto tenemos la opción de ratio 1:#, que multiplica por X numero el rango entre la entrada y el stop loss para usarlo como take profit, perfecto para estrategias que usen ATR o ultimo punto alto/bajo.
📈 Entradas Heikin Ashi: Las entradas Heikin Ashi son trades que son calculados en base a las velas Aeikin Ashi pero su precio esta ejecutado a velas japonesas, evitando así los falsos resultados que se producen en graficas de velas Heikin, esto haciendo que en ciertos casos se obtengan mejores resultados en las estrategias que son ejecutadas con esta opción en comparación con las velas japonesas.
📊 Panel de Control: Una manera mas visual y organizada de ver los resultados y datos necesarios de nuestra estrategia.
Siéntete libre de usar esta plantilla para programar tus propias estrategias, si encuentras errores o quieres solicitar una nueva función házmelo saber en los comentarios o a través de mi Telegram: @hvert_mt
Key Performance IndicatorWe are happy to introduce the Key Performance Indicator by Detlev Matthes. This is an amazing tool to quantify the efficiency of a trading system and identify potential spots of improvement.
Abstract
A key performance indicator with high explanatory value for the quality of trading systems is introduced. Quality is expressed as an indicator and comprises the individual values of qualitative aspects. The work developing the KPI was submitted for the 2017 VTAD Award and won first prize.
Introduction
Imagine that you have a variety of stock trading systems from which to select. During backtesting, each trading system will deliver different results with regard to its indicators (depending on, inter alia, its parameters and the stock used). You will also get different forms of progression for profit development. It requires great experience to select the “best” trading system from this variety of information (provided by several indicators) and significantly varying equity progression forms. In this paper, an indicator will be introduced that expresses the quality of a trading system in just one figure. With such an indicator, you can view the results of one backtest at a glance and also more easily compare a variety of backtesting results with one another.
If you are interested in learning more about the calculations behind this indicator then I have included a link to the english version of his research paper.
Along with this, we now offer indicator development services. If you are interested in learning more then feel free to reach out to get a quote for your project.
**Please note that we have NOT inputted any real strategy into the code and therefore it is not producing any real value. Feel free to change the code as desired to test any strategy!**
drive.google.com
Squeeze Momentum Strategy [LazyBear] Buy Sell TP SL Alerts-Modified version of Squeeze Momentum Indicator by @LazyBear.
-Converted to version 5,
-Taken inspiration from @KivancOzbilgic for its buy sell calculations,
-Used @Bunghole strategy template with Take Profit, Stop Loss and Enable/Disable Toggles
-Added Custom Date Backtesting Module
------------------------------------------------------------------------------------------------------------------------
All credit goes to above
Problem with original version:
The original Squeeze Momentum Strategy did not have buy sell signals and there was alot of confusion as to when to enter and exit.
There was no proper strategy that would allow backtesting on which further analysis could be carried out.
There are 3 aspects this strategy:
1 ) Strategy Logic (easily toggleable from the dropdown menu from strategy settings)
- LazyBear (I have made this simple by using Kivanc technique of Momentums Moving Average Crossover, BUY when MA cross above signal line, SELL when crossdown signal line)
- Zero Crossover Line (BUY signal when crossover zero line, and SELL crossdown zero line)
2) Long Short TP and SL
- In strategies there is usually only 1 SL and 1 TP, and it is assumed that if a 2% SL giving a good profit %, then it would be best for both long and short. However this is not the case for many. Many markets/pairs, go down with much more speed then they go up with. Hence once we have a profitable backtesting setting, then we should start optimizing Long and Short SL's seperately. Once that is done, we should start optimizing for Long and Short TP's separately, starting with Longs first in both cases.
3) Enable and Disable Toggles of Long and Short Trades
- Many markets dont allow short trades, or are not suitable for short trades. In this case it would be much more feasible to disable "Short" Trading and see results of Long Only as a built in graphic view of backtestor provides a more easy to understand data feed as compared to the performance summary in which you have to review long and short profitability separately.
4) Custom Data Backtesting
- One of most crucial aspects while optimizing for backtesting is to check a strategies performance on uptrends, downtrend and sideways markets seperately as to understand the weak points of strategy.
- Once you enable custom date backtesting, you will see lines on the chart which can be dragged left right based on where you want to start and end the backtesting from and to.
Note:
- Not a financial advise
- Open to feedback, questions, improvements, errors etc.
- More info on how the squeeze momentum works visit LazyBear indicator link:
Happy Trading!
Cheers
M Tahreem Alam @mtahreemalam
Bitpanda Coinrule TemplateThis strategy for Bitpanda on the Coinrule platform utilises 3 different conditions that have to be met to buy and 1 condition to sell. This strategy works best on the ETH/EUR pair on the 4 hour timescale.
In order for the strategy to enter the trade it must meet all of the conditions listed below.
ENTRY
RSI increases by 5
RSI is lower than 70
MA9 crosses above MA50
EXIT
MA50 crosses above MA9
This strategy works well on LINK/EUR on the 1 day timeframe, MIOTA/EUR on the 2 hour timeframe, BTC/EUR on the 4 hour timeframe and BEST/EUR on the 1 day timeframe (and 4h).
Back tested from 1 January 2020.
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.
Buy/Sell Signal Template/Boilerplate Strategy [MyTradingCoder]This script allows the user to connect an external indicator output/plot value to allow for a no-code solution to setup a simple buy/sell signal strategy. For those of you who do not know how to program, do not be intimidated as this is a very easy setup process.
Maybe you want to buy when the 'RSI' value drops below '30' and then sell when the 'RSI' value climbs above '70', but you don't want to code it. You can do that with this indicator along with thousands of others found on the free TradingView indicator library.
Step #1:
Put the strategy on the chart.
Step #2:
Apply a secondary indicator onto the chart, such as an RSI .
Step #3:
Open the strategy settings and change the source to the RSI
Step #4:
Change the 'Signal Settings' to match when you want a buy, or a sell. For example, if you want to get a buy signal when the RSI crosses above 50, and get a sell when it crosses below 50, set the 'buy value' to 50, and the 'buy type' to greater than, then set the 'sell value' to 50 and the 'sell type' to less than. BOOM! It works :)
Strategy Backtesting Template [MYN]A few people have been asking me to share my backtesting template. Currently I use this as my starting point for validating existing strategies and developing new ones.
Features:
Trading Date Range
Trade Direction
4 progressive take profits with target percents and percentage of position to take profit on (Thanks adolgo)
Variable percentage Stop Loss
Automatic ProfitView Alert Syntax builder for Longs and Shorts
ADX checkbox to automatically add conditional logic to your strategy
When was the last time we were in stagflation?Here I coded a strategy that indicates when we should enter a long position in the US dollar. The three indicators I used were the Inflation Rate, 10Y interest rate, and GDP growth rate. Right now in our economy, It seems as though we are in stagflation due to high inflation and declining GDP growth. Thoughts on how our government should handle the oversupply of money in the economy right now are another conversation. The reason I built this indicator is to see when the last time our country was in this type of market environment was and to see how far the dollar rose from that point on. It is necessary to say that the US dollar generally does not show these steep increases in value unless there is a hard cut in the Money supply. However, what we see is that the last time we were in stagflation was around the early 1980s when the dollar value rose to around 107( the levels we're at right now) and did not stop until It hit its peak at 150!!!! This isn't all that exciting really because if the FED follows a similar path as It did back in the '80s then we are going to see a whole lot more money supply being cut, an increase in interest rates, and a declining GDP Growth rate.
ATTENTION: This indicator does not tell you to buy any financial instrument that follows the DXY(US Dollar index), with that being said please feel free to comment and tell me your opinion. whether it's how bad my coding is(I'm a beginner sorry!!) or whether my ideas on our market environment right now are bogus or just do not make sense.
Strategy BackTest Display Statistics - TraderHalaiThis script was born out of my quest to be able to display strategy back test statistics on charts to allow for easier backtesting on devices that do not natively support backtest engine (such as mobile phones, when I am backtesting from away from my computer). There are already a few good ones on TradingView, but most / many are too complicated for my needs.
Found an excellent display backtest engine by 'The Art of Trading'. This script is a snippet of his hard work, with some very minor tweaks and changes. Much respect to the original author.
Full credit to the original author of this script. It can be found here: www.tradingview.com
I decided to modify the script by simplifying it down and make it easier to integrate into existing strategies, using simple copy and paste, by relying on existing tradingview strategy backtester inputs. I have also added 3 additional performance metrics:
- Max Run Up
- Average Win per trade
- Average Loss per trade
As this is a work in progress, I will look to add in more performance metrics in future, as I further develop this script.
Feel free to use this display panel in your scripts and strategies.
Thanks and enjoy :)
Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTESTSmoothed Heikin Ashi Trend on chart - Backtest
This is a backtest of the Smoothed Heikin Ashi Trend indicator, which computes the reverse candle close price required to flip a Heikin Ashi trend from red to green and vice versa. The original indicator can be found in the scripts section of my profile.
This particular back test uses this indicator with a Trend following paradigm with a percentage-based stop loss.
Note, that backtesting performance is not always indicative of future performance, but it does provide some basis for further development and walk-forward / live testing.
Testing was performed on Bitcoin , as this is a primary target market for me to use this kind of strategy.
Sample Backtesting results as of 10th June 2022:
Backtesting parameters:
Position size: 10% of equity
Long stop: 1% below entry
Short stop: 1% above entry
Repainting: Off
Smoothing: SMA
Period: 10
8 Hour:
Number of Trades: 1046
Gross Return: 249.27 %
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 28.01 %
Profit Factor (Expectancy): 2.019
Average Loss: 0.33 %
Average Win: 1.69 %
Average Time for Loss: 1 day
Average Time for Win: 5.33 days
1 Day:
Number of Trades: 429
Gross Return: 458.4 %
CAGR Return: 15.76 %
Max Drawdown: 6.37 %
Profit Factor (Expectancy): 2.804
Average Loss: 0.8 %
Average Win: 7.2 %
Average Time for Loss: 3 days
Average Time for Win: 16 days
5 Day:
Number of Trades: 69
Gross Return: 1614.9 %
CAGR Return: 26.7 %
Max Drawdown: 5.7 %
Profit Factor (Expectancy): 10.451
Average Loss: 3.64 %
Average Win: 81.17 %
Average Time for Loss: 15 days
Average Time for Win: 85 days
Analysis:
The strategy is typical amongst trend following strategies with a less regular win rate, but where profits are more significant than losses. Most of the losses are in sideways, low volatility markets. This strategy performs better on higher timeframes, where it shows a positive expectancy of the strategy.
The average win was positively impacted by Bitcoin’s earlier smaller market cap, as the percentage wins earlier were higher.
Overall the strategy shows potential for further development and may be suitable for walk-forward testing and out of sample analysis to be considered for a demo trading account.
Note in an actual trading setup, you may wish to use this with volatility filters, combined with support resistance zones for a better setup.
As always, this post/indicator/strategy is not financial advice, and please do your due diligence before trading this live.
Original indicator links:
On chart version -
Oscillator version -
Update - 27/06/2022
Unfortunately, It appears that the original script had been taken down due to auto-moderation because of concerns with no slippage / commission. I have since adjusted the backtest, and re-uploaded to include the following to address these concerns, and show that I am genuinely trying to give back to the community and not mislead anyone:
1) Include commission of 0.1% - to match Binance's maker fees prior to moving to a fee-less model.
2) Include slippage of 10 ticks (This is a realistic slippage figure from searching online for most crypto exchanges)
3) Adjust account balance to 10,000 - since most of us are not millionaires.
The rest of the backtesting parameters are comparable to previous results:
Backtesting parameters:
Initial capital: 10000 dollars
Position size: 10% of equity
Long stop: 2% below entry
Short stop: 2% above entry
Repainting: Off
Smoothing: SMA
Period: 10
Slippage: 10 ticks
Commission: 0.1%
This script still remains to shows viability / profitablity on higher term timeframes (with slightly higher drawdown), and I have included the backtest report below to document my findings:
8 Hour:
Number of Trades: 1082
Gross Return: 233.02%
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 25.6%
Profit Factor (Expectancy): 1.627
Average Loss: 0.46 %
Average Win: 2.18 %
Average Time for Loss: 1.33 day
Average Time for Win: 7.33 days
Once again, please do your own research and due dillegence before trading this live. This post is for education and information purposes only, and should not be taken as financial advice.
MAPM-V1Greetings dear traders!
I would like to introduce you the script for testing the strategy by crossing two signal EMAs based on the MACD indicator.
In the strategy itself:
The entry is made as a percentage of the deposit by EMA crossings.
There are additional purchases, they are set from the entry price for a given percentage in the opposite direction of the transaction.
The distance in percentage from the entry price, on which the additional purchase is exposed, is set in the StepAddPurchases parameter.
The Martingale parameter increases the initially purchased amount of the base traded cryptocurrency in each additional purchase.
The essence of the strategy is to trade a large number of pairs in order to diversify risks and obtain a stable income.
It is desirable to enter each trading pair with a small percentage of the deposit.
The optimization result shows the trading result for the period of 5000 bars (the platform does not give more history) on 10% of the deposit for the first transaction, the addition will also take place on initially bought amount of base traded cryptocurrency, multiplied by the martingale parameter, raised by the number of addition.
The strategy will still be updated, so see you soon!
3C QFL Mean reversalWhat is QFL trading strategy?
QFL stands for Quickfingersluc, and sometimes it is referred to as the Base Strategy or Mean Reversals. Its main idea is about identifying the moment of panic selling and buying below the base level and utilizing Safety orders.
What is Base level or Support Level?
Base level or Support Level refers to the lowest price level that was reached before the moment the price started increasing again. At that level, you can notice that buyers of some cryptocurrencies make a strong reaction.
In this strategy we can also reverse the strategy and go short. But i must warn you that that is alot riskier.
QFL is meant to be used on higher TF's like 1hr, 2hr and 4hr. But this strategy also work well on lower Timeframes.
The script also simulates DCA strategy with parameters used in 3commas DCA bots for futures trading.
Experiment with parameters to find your trading setup.
Beware how large your total leveraged position is and how far can market go before you get liquidated!
Do that with the help of futures liquidation calculators you can find online!
Included:
An internal average price and profit calculating, instead of TV`s native one, which is subject to severe slippage.
A graphic interface, so levels are clearly visible and back-test analyzing made easier.
Long & Short direction of the strategy.
Table display a summary of past trades
Vertical colored lines appear when the new maximum deviation from the original price has
been reached
All the trading happens with total account capital, and all order sizes inputs are expressed in percent.
Strategy Oil Z ScoreObjective is to find forward looking indicators to find good entries into major index's.
In similar vein to my Combo Z Score script I have implemented one looking at oil and oil volatility. Interestingly the script out performs WITHOUT applying the EMA in longer timeframes but under performs in shorter timeframes, for example 2007 vs 2019. Likely due to the bullish nature of the past decade (by and large). You have some options on the underlying included Oil vs OVX (Best), MOVE vs OVX and VIX vs OVX. Oil vs OVX out performs Combo Z Script. Favours Spy over QQQ or derivations (SPXL etc).
2x take profit, move stop loss to entryTwo take profit targets moving stop loss to entry after first take profit hit
This strategy shows a method to achieve the following trade management:
1) Open a position with two take profit targets
2) When first take profit is hit, move the stop loss to entry price
3) Position is closed when either second take profit is hit or position is stopped out at entry
Trading Conditions
The trading conditions used in this script are for illustrative purposes only and are not meant to be profitable.
Bollinger Bands
Used to show areas where price is moving outside of the normal range
Stochastic
Used to show overbought and oversold conditions.
Green dots are plotted when the K line crosses over its SMA. Red dots are plotted when the K line crosses under its SMA.
The option to use overbought/oversold thresholds is again illustrative.
5MSM VISHNU5MSM VISHNU Indicator for Trending Markets originally written by patrick1994.
It was originally based on the MACD 12-26 and the 50 bar EMA .
The macd hist is color coded with green as buy and sell as red.
I added an option to use a couple of lower lag ema's (See line 13 - ema_signal).
5MSM VISHNU with MACD Indicator for Trending Markets
Originally written by Trading Rush
Note that the user may choose lower lags to compute the MACD signals
added lower lag ema functions - see lines 21 to 30
added plot for the MACD signal 'hist' - computed in lines 36 to 41
The extra MACD line was added for clarity for the placement of the buy sell signals.