(IK) Stoch-60-15This strategy uses 60 minute and 15 minute stochastic data to determine entry and exit; it only executes long trades. I've only used this on BTC/USD, but I imagine the concepts employed should hold for any ticker
The script builds a simple Stochastic indicator for the current timeframe, and it also plots a single stochastic line for a higher resolution time frame. I've found good results trading on 15 minutes with a 60 minute higher resolution.
We enter a trade if the higher resolution stochastic is in an uptrend, if the current resolution stochastic is in an uptrend, and if the current stochastic value is less than 50.
We exit a trade when the current stochastic value crosses below 80 or the trailing stop loss is hit.
Stop loss is calculated with the input value, Stop Loss Percent. This value represents the percent of capital you're willing to lose before exiting a trade. A stop loss percent of 0.050 means your trade will exit if it falls 5% from the highest high since entering a trade. You will have at least 95% of your original capital left. There is no option to change a trailing stop loss to a set stop loss (in order to keep the code as simple as possible), however, you can turn it off by setting Stop Loss Percent to 1.
I tried to keep the script itself lightweight and very easy to understand, so it's not very customizable in regards to input options. You can change stochastic data, as well as the trailing stop percentage. The script can be adjusted to other timeframes, however this requires a small change in the code (details in script comments). Changing just the "Higher Resolution" input will not produce expected results
My hope is that by keeping it lightweight and simple, it will be easier for you to adjust to your specific needs, or work into a larger strategy.
BTC-M
Crypto rsi cci mf stoch rsi oscillators all in one strategyThis is a strategy based on the popular oscillator like RSI, CCI, MF and Stochastic RSI oscillators.
In this situation I use a very high length , 100 candles, and the middle point between overbought and oversold levels at 50.
The entry for long is when all oscilators are above 50, and the exit is when they are below 50 + plus some minor modifications
If you have any questions, please message me a private message !
Momentum Strategy (BTC/USDT; 1h) - MACD (with source code)Good morning traders.
It's been a while from my last publication of a strategy and today I want to share with you this small piece of script that showed quite interesting result across bitcoin and other altcoins.
The macd indicator is an indicator built on the difference between a fast moving average and a slow moving average: this difference is generally plottted with a blue line while the orange line is simply a moving average computed on this difference.
Usually this indicator is used in technical analysis for getting signals of buy and sell respectively when the macd crosses above or under its moving average: it means that the distance of the fast moving average (the most responsive one) from the slower one is getting lower than what it-used-to-be in the period considered: this could anticipate a cross of the two moving averages and you want to anticipate this potential trend reversal by opening a long position
Of course the workflow is specularly the same for opening short positions (or closing long positions)
What this strategy does is simply considering the moving average computed on macd and applying a linear regression on it: in this way, even though the signal can be sligthly delayed, you reduce noise plotting a smooth curve.
Then, it simply checks the maximums and the minimums of this curve detecting whenever the changes of the values start to be negative or positive, so it opens a short position (closes long) on the maximum on this curve and it opens a long position (closes short) on the minimum.
Of course, I set an option for using this strategy in a conventional way working on the crosses between macd and its moving average. Alternatively you can use this workflow if you prefer.
In conclusion, you can use a tons of moving averages: I made a function in pine in order to allw you to use any moving average you want for the two moving averages on which the macd is based or for the moving average computed on the macd
PLEASE, BE AWARE THAT THIS TRADING STRATEGY DOES NOT GUARANTEE ANY KIND OF SUCCESS IN ADVANCE. YOU ARE THE ONE AND ONLY RESPONSIBLE OF YOUR OWN DECISIONS, I DON'T TAKE ANY RESPONSIBILITY ASSOCIATED WITH THEM. IF YOU RUN THIS STRATEGY YOU ACCEPT THE POSSIBILITY OF LOOSING MONEY, ALL OF MY PUBBLICATIONS ARE SUPPOSED TO BE JUST FOR EDUCATIONAL PURPOSES.
IT IS AT YOUR OWN RISK WHETHER TO USE IT OR NOT
But if you make money out of this, please consider to buy me a beer 😜
Happy Trading!
Flawless Victory Strategy - 15min BTC Machine Learning StrategyHello everyone, I am a heavy Python programmer bringing machine learning to TradingView. This 15 minute Bitcoin Long strategy was created using a machine learning library and 1 year of historical data in Python. Every parameter is hyper optimized to bring you the most profitable buy and sell signals for Bitcoin on the 15min chart. The historical Bitcoin data was gathered from Binance API, in case you want to know the best exchange to use this long strategy. It is a simple Bollinger Band and RSI strategy with two versions included in the tradingview settings. The first version has a Sharpe Ratio of 7.5 which is amazing, and the second version includes the best stop loss and take profit positions with a Sharpe Ratio of 2.5 . Let me talk a little bit more about how the strategy works. The buy signal is triggered when close price is less than lower Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. The sell signal is triggered when close price is greater than upper Bollinger Band at Std Dev 1, and the RSI is greater than a certain value. What makes this strategy interesting is the parameters the Machine Learning library found when backtesting for the best Sharpe Ratio. I left my computer on for about 28 hours to fully backtest 5000 EPOCHS and get the results. I was able to create a great strategy that might be one of TradingView's best strategies out on the website today. I will continue to apply machine learning to all my strategies from here on forward. Please Let me know if you have any questions or certain strategies you would like me to hyper optimize for you. I'm always willing to create profitable strategies!
P.S. You can always pyramid this strategy for more gains! I just don't add pyramiding when creating my strategies because I want to show you the true win/loss ratio based buying one time and one selling one time. I feel like when creating a strategy that includes pyramiding right off the bat falsifies the win rate. This is my way of being transparent with you all. Have fun trading!
Heikin Ashi + Price Action Crypto LONG StrategyThis is a simple and efficient crypto strategy, designed for big timeframes like 12/24h.
On history it beats buy and hold strategy in many ocasions, and because of a low DD, pyramid can be used to elevate our winnings while still keeping a low DD < 40% avg.
For the purpose of this example, I used 100% of the capital on each trades, together with a comission of 0.1%
Warning : THERE IS NO STOP LOSS ON THIS STRATEGY ,USE IT AT YOUR OWN RISK
This strategy is made with inside Heikin Ashi candles , together with some price actions logics like for long Close > High and green candle and High > High .
We exit when we have a red candle and the current close is lower than the previous Low
If you have any questions, message me in private !
Heikin-Ashi Change Strategy/ Indicator
Today I bring you a simple and efficient indicator/strategy based only on HA.
Can be used together with other TA tools or alone.
The idea behind is simple :
We have to forms to calculate the candle, using inner HA candles or normal candles. Once we have that we apply certain rules to get the max high, min low, open and close(ohlc)
With that then we check for changing in the patters like for example
For long close is higher than open and the previos close is lower than open. For short is going to be the opposite of long condition.
For the purpose of this example, I only use long direction and exit once we have the short signal.
If you have any questions, please let me know in private chat !
Momentum Strategy (BTC/USDT; 30m) - STOCH RSI (with source code)Here's a strategy for low time frames (30min suggested) for BTC , based on momentum Analysis using Stochastic RSI
By default the strategy will use the 50% of the specified capital for each trade; if "Gamble Sizing" is enabled, it will add the specified amount of capital (25% by default, until reaching the 100% limit or lower) for the next trade after having detected a loss in the previous trade; if the next trade is successful, the size for the next trade comes back to 50%
• Trend Filter LONG: If the fast exponential moving average is UNDER the slow exponential moving average , it won't open LONG positions
• Trend Filter SHORT: If the fast exponential moving average is ABOVE the slow exponential moving average , it won't open SHORT positions
• Bars delay: the strategy will wait the specified amount of bars before closing the current position; the counter is triggered as soon as the closing trade condition is verified
BY MAKING USE OF THIS STRATEGY, YOU ACKNOWLEDGE AND AGREE THAT: (1) YOU ARE AWARE OF THE RISKS ASSOCIATED WITH TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; (2) YOU SHALL ASSUME ALL RISKS RELATED TO THE USE OF THIS STRATEGY AND TRANSACTIONS OF DIGITAL CURRENCIES AND THEIR DERIVATIVES; AND (3) I SHALL NOT BE LIABLE FOR ANY SUCH RISKS OR ADVERSE OUTCOMES.
SOURCE CODE BELOW
Best Crypto DEMA Strategy Long onlyThis is a crypto strategy suited for big time frames like 3h+.
THIS IS A LONG ONLY STRATEGY , SUITED TO BEAT BUY AND HOLD !
It's a very risky strategy because it has no stop loss at all, so be extremely careful with it.
This strategy is made of 2 DEMA a fast and a slow one.
We have two rules : entry it's when we have a crossunder between the slow DEMA and the fast DEMA. We exit when the opposite happens, in this case, when the slow is above fast.
For this example I used an initial capital of 1000 eur, using 100% of it always, and a commission of 0.2% per each deal.
OCC Trend Combo 1 day BTC MoonflagRuns on BTC 1 DAY (NOTE USE THIS NOT THE PREVIOUS VERSION - DEFAULTS TUNED TO 1 day BTC HERE)
USE DEFAULT SETTINGS
The strategy is to maximise the profit for OCC longs (ALMA algo)
Longs start when the price action settles around the ALMA OCC, then typically breaks up
Then follow the trend indcator (blue/orange)
Shorts normally happen when the price action crosses below the ALMA OCC, although these initiate faster than the 1 day time setting - so watchout for shorts - are harder to predict than longs
So this catches most of the big move longs at their initiation
CRYPTO HA Strategy money maker long termToday I bring you another amazing strategy.
Its made of 2 EMA in this case 50 and 100.
At the same time, internaly for candles we calculate the candles using the HA system ( while still using in live the normal candles). This way we can assure that even if we use HA candles, we avoid repainting, and its legit.
We first calculate the HA candles based on the EMA 50 values, and after that , we use that candle properties to apply to EMA 100.
Once we have that, for entries we have the next conditions :
sell = o2 > c2 and o2 < c2 and time_cond
buy = o2 < c2 and o2 > c2 and time_cond
For sell : Our open from HA 100 is bigger than Close from ha 100, and the previous open is smaller than previous close
For long : Our open from ha 100 is smaller than close from ha 100 and the previous open is bigger than previous close.
Then we have 2 options :
If we wnat to go only long , which is my prefered version ,or the original one where we go both long and short.
I found that the best results are in general around bigger timeframes, 1h+ , 3h works the best so far on my tests.
For exit we have 2 versions :
1 lets say we had a long signal, as soon as we have a short signal we close the trade. Viceversa for short.
2. Is based on price % movement. In this case I use 7.5% price movement of asset.
We have no TP in use for this system.
For the purpose of this test I use 10.000 $ account. For test I use 100% of it, without any leverage.
I use the SL based on price movement , which is a very risky tool, since it can fluctuate even at 20-30% of our capital.
For comission I used 0.1% for each deal, and a slippage of 5 points.
Be cautious with this system !
If you have any questions , message me.
Crypto MultiTrend multi timeframesHello, today I bring you another crypto strategy which can work with multiple timeframes and most of crypto currencies
Its made entirelly of multiple EMA , of different lengths : like super fast, fast, normal, slow and very slow
We also combine a little bit of price action together with the trend direction both for entry and for exits, to have a more precise control.
The rules for long close is above all EMA's, they are in ascending order and the at same time close is bigger than the previous high, and previous high > second previous high, close > 3rd previous high , close > 4th previous high, close > 5th previous high, 5th high > 6th high.
For short we have the same, but instead of high, we use lows, and instead of > we use < .
As exit we have 2 conditions for long and 2 for short
To exit long we have : super fast ema < fast ema and fast ema < normal and normal < slow ema. For short, they would be the opposite, using > sign.
The second exit for long is when our current low crosses below 4 of ours EMA during the same candle. For short, is when the high crosses above 4 of ours EMA during the same candle.
CAUTIOUS : Currently it uses not risk management system, so in this current condition is extremely risky . Be careful
If you have any questions lets me know
Daily Crypto StrategyThis is a long only strategy.
This strategy measures and creates a signal when an asset is moving out of a correlation with CBOE VIX into an inverse correlation.
It also has a risk management with TP/SL based on percentages.
If you have any questions let me know.
BTC and ETH Long strategy - version 2I wrote my first article in May 2020. See below
BTC and ETH Long strategy - version1
After 6 months, it is now time to check the result of my script for the last 6 months.
XBTUSD (4H): 14/05/2020 --> 22/11/2020 = +78% in 4 trades
ETHXBT (4H): 14/05/2020 --> 22/11/2020 = +21% in 9 trades
ETHUSD (4H): 14/05/2020 --> 22/11/2020 = +90% in 6 trades
Using the signals from this strategy to trade manually has shown that this was a bit frustrating because of the low rate of winning trades.
If you have to enter 100 trades and see 75% of them failing and 25% winning, this is frustrating. For sure the strategy makes good money but it is difficult to hold this mentality.
So, I have reviewed and modified it to get a higher winning rate.
After few days of work, tests and validation, I managed to get a wining rate close to 60%.
The key element was also to decrease the number of trades by using a higher time frame. (4H candles instead of 2H candles).
- Entry in position is based on
MACD, EMA (20), SMA (100), SMA (200) moving up
AND EMA (20) > SMA (100)
AND SMA (100) > SMA (200)
- Exit the position if: Stoploss is reached OR EMA (20) crossUnder SMA (100)
The goal of this new script is to be able to follow the signals manually and only make few trades per years.
I have also validated it against some other altcoins where some are giving very good results.
Here are some results for 2020 (from 01/01/2020 until now (22/11/2020). Those results are the one I get when using 4H candles.
ETH/USD: +144% in 8 trades.
BTC/USD: +120% in 7 trades.
ETH/BTC: +33% in 9 trades.
ICX/USD: +123% in 10 trades.
LINK/USD: +155% in 11 trades.
MLN/USD: +388% in 8 trades.
ADA/USD: +180% in 7 trades.
LINK/BTC: +97% in 10 trades.
The best is that above results are without considering compound effect. If you re-invest all gains done in each new trade, this will give you the below results :)
ETH/USD: +189% in 8 trades.
BTC/USD: +260% in 7 trades.
ETH/BTC: +29% in 9 trades.
ICX/USD: +112% in 10 trades.
LINK/USD: +222% in 11 trades.
MLN/USD: +793% in 8 trades.
ADA/USD: +319% in 7 trades.
LINK/BTC: +103% in 10 trades.
As you can see, the results are good and the number of trades for 11 months is not big, which allows the trader to place orders manually.
But still, I'm lazy :), so, I have also coded this strategy in HaasScript language which allows you to automate this strategy using the HaasOnline software specialized in automated crypto trading.
I hope that this strategy will give you ideas or will be the starting point for your own strategy.
Let me know if you need more details.
Simple Moving Average + ADX + DMI + Time Range Test
Use long and short moving average to look for a potential price in/out. (default as 14 and 7, bases on the history experience)
ADX and DMI to prevent the small volatility and tangling MA.
This script allows you to set the beginning & end time to test the bullish & bearish market.
If you want an indicator version, here is it.
Thanks.
TSI CCI Hull with profit$$$This is a modified version of @SeaSide420 TSI CCI Hull with profits exit on long and short order
ORIGINAL SCRIPT:
/// /// feel free to edit/improve and comment
BTC and ETH Long strategy - version 1I will start with a small introduction about myself. I'm now trading cryto currencies manually for almost 2 years. I decided to start after watching a documentary on the TV showing people who made big money during the Bitcoin pump which happened at the end of 2017.
The next day, I asked myself "Why should I not give it a try and learn how to trade".
This was in February 2018 and the price of Bitcoin was around 11500USD.
I didn't know how to trade. In fact, I didn't know the trading industry at all.
So, my first step into trading was to open an account with a broken. Then I directly bought 200$ worst of BTC . At that time, I saw the graph and thought "This can only go back in the upward direction!" :)
I didn't know anything about Stop loss, Take profit and Risk management.
Today, almost 2 years after, I think that I know how to trade and can also confirm that I still hold this bag of 200$ of bitcoin from 2018 :)
I did spend the 2 last years to learn technical analysis , risk management and leverage trading.
Today (14/05/2020), I know what I'm doing and I'm happy to see that the 2 last years have been positive in terms of gains. Of course, I did not make crazy money with my saving but at least I made more than if I would have kept it in my bank account.
Even if I like trading, I have a full time job which requires my full energy and lots of focus, so, the biggest problem I had is that I didn't have enough time to look at the charts.
Also, I realized that sometimes, neither technical analysis , nor fundamentals worked with crypto currency (at least for short time trading). So, as I have a developer background I decided to try to have a look at algo trading.
The goal for me was neither to make complex algos nor to beat the market but just to automate my trading with simple bot catching the big waves.
I then started to take a look at TV pine script and played with it.
I did my first LONG script in February 2020 to Long the BTC Market. It has some limitations but works well enough for me for the time being. Even if the real trades will bring me half of what the back testing shows, this will still be a lot more than what I was used to win during the last 2 years with my manual trading.
So, here we are! Below you will find some details about my first LONG script. I'm happy to share it with you.
Feel free to play with it, give your comments and bring improvements to it.
But please note that it only works fine with the candle size and crypto pair that I have mentioned below. If you use other settings this algo might loose money!
- Crypto pairs : XBTUSD and ETHXBT
- Candle size: 2 Hours
- Indicator used: Volatility , MACD (12, 26, 7), SMA (100), SMA (200), EMA (20)
- Default StopLoss: -1.5%
- Entry in position if: Volatility < 2%
AND MACD moving up
AND AME (20) moving up
AND SMA (100) moving up
AND SMA (200) moving up
AND EMA (20) > SAM (100)
AND SMA (100) > SMA (200)
- Exit the postion if: Stoploss is reached
OR EMA (20) crossUnder SMA (100)
Here is a summary of the results for this script:
XBTUSD : 01/01/2019 --> 14/05/2020 = +107%
ETHXBT : 01/01/2019 --> 14/05/2020 = +39%
ETHUSD : 01/01/2019 --> 14/05/2020 = +112%
It is far away from being perfect. There are still plenty of things which can be done to improve it but I just wanted to share it :) .
Enjoy playing with it....
eha Moving Averages StrategyMoving Average based strategies are very popular ones among both long-term investors and short-term traders as they can be tailored to any time frame. One of the main moving average strategies are crossovers. The very simple type is a price crossover , which is when the price crosses above or below a moving average to signal a potential change in trend.
Another strategy is to apply two moving averages to a chart: one longer (or slow) and one shorter (or fast). When the shorter-term MA crosses above the longer-term MA, it's a buy signal, as it indicates that the trend is shifting up (also known as “ Golden Cross ”). Meanwhile, when the shorter-term MA crosses below the longer-term MA, it's a sell signal, as it indicates that the trend is shifting down (which is also known as “ Dead/Death Cross ”).
This is a study to find a suitable trading strategy for 4-6 hour time frames. As you can see the performance is currently very poor. It has just generated almost 90 trades in a very long period from January 2017 to the time of publishing the study for the first time.
Moving averages work quite well in strong trending conditions but poorly in choppy or ranging conditions. Adjusting the time frame can correct this problem temporarily, although, at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).
I am working on this basic strategy to make its performance better and I will update the post in the future. So keep in touch by following the post.
Why have I republished my study?
It sounds like TradingView stores and indexes scripts based on the title of the post rather than the actual title of the scripts and if one chose general terms as the title of the post, the TradingView script search engine may be unable to find it. So I decided to repost the strategy with a more searchable and unique prefix of " eha ".
Please provide me with your precious feedback.
Parabolic SAR Strategy (on close) [QuantNomad]Created a Parabolic SAR strategy where price has to close under/above the level before for it to reverse. This way it should be a bit more stable and protect you from false breakouts.
It was impossible to adjust the built-in "sar" function so I implemented PSAR from scratch. So if you're interested in how it's work inside you can check the code and probably adjust to your need if you have a custom modification of PSAR in your mind.
Leverage Strategy and a few words on risk/opportunityHello traders,
I started this script as a joke for someone... finally appears it could be used for educational content
Let's talk about leverage and margin call
Margin Call
A margin call is the broker's demand that an investor deposit additional money or securities so that the account is brought up to the minimum value, known as the maintenance margin.
A margin call usually means that one or more of the securities held in the margin account has decreased in value below a certain point.
Leverage
A leverage is a system which allows the trader to open positions much larger than his own capital. ... “Leverage” usually refers to the ratio between the position value and the investment needed,
Strat
The strategy simulates long/short positions on a 4h high/low breakout based on the chart candle close.
The panel below shows the strategy equity curve. Activating the margin call option will show when the account would be margin called giving the settings
Casino
I'm not doing any financial recommendation here.
I made this strategy so that people include more risk management metrics into their strategy.
From the code, we see it's fairly easy to calculate a leveraged position size and a margin call flag - when that flag is hit, the system stops trading.
I simplified things to the extreme here but my point is that the leverage is a double-edge sword gift.
Assuming we always take the same position sizing, increasing the leverage speed up how fast a margin could be ..... called. (bad joke? feel free to tell me). Not saying it will, saying it introduces more risk by design.
Then one could say "I'll just turn off that stupid margin call option". And that's when someone starts backtesting with unrealistic market conditions.
Finally...
When I backtest I always assume the worst in every scenario possible (because I'm French), I always try to minimize the risk first (also because I'm French), keeping as close from 0 as possible (French again)
Then I add the "opportunity" component, looking to catch the maximum of opportunity while keeping the risk low.
It's like a Rubix cube puzzle - decreasing the risk is one side of the equation but whenever I try to catch more opportunity... my risks increases.
Then I update my risk... and now the opportunity decreases... (#wut #wen #simple)
Completely removing the risk from a trading strategy isn't something I wouldn't dare doing.
Trading involves risk. Being obsessed by decreasing the risk is what I do BEST :)
Dave
EVWBB Strategy [QuantNomad]It's my new strategy using EVWMA (Elastic Volume Weighted Moving Average).
Now I created a Bollinger Bands strategy where basis level is EVWMA.
It looks pretty interesting but you have to be careful with the entries/exits on the same bar, I'm using stop orders, so on big moves it happens pretty often.
In the next version, I will try to eliminate these issues.
Entry for this strategy happens when price crossover upper for long and lower for short. I exit both short and long on basis level.
EVWMA VWAP Cross Strategy [QuantNomad]Continue to experiement with VWAP and EVWMA.
It seems that just simple crosses between VWAP and EVWMA can be pretty good signals. VWAP is a bit choppy so you can use VWAP smoothing input to smoth it a bit.
Here are few other strategies based on EVWMA:
EVWMA VWAP MACD Strategy
QuantNomad - EVWMA MACD Strategy
QuantNomad - EVWMA MACD StrategyPretty simple EVWMA (Elastic Volume Weighted Moving Average ) MACD Strategy.
EVWMA is a quite interesting moving average where the period of the MA is defined from the volume itself.
It incorporates volume information in a natural and logical way. The EVWMA can be looked at as an approximation to the average price paid per share.
As a volume period, you can use sum of the last x bars volumes.
Here are other EVWMA indicators/strategies:
EVWMA indicator:
EVWMA Cross strategy:
Simple BTC trading strategy based on yesterday's trading rangeOnce market opens, the strategy calculates the price to send a stop buy order
The order is calculated as the sum of yesterday's range multiplied by a special number and today's open price
System has no stops yet
System closes the position on session close
The performance is quite good
Feel free to use it and trade it
Good luck and good trading