Fast v Slow Moving Averages Strategy (Variable) [divonn1994]This is a simple moving average based strategy that takes 2 moving averages, a Fast and a Slow one, plots them both, and then decides to enter a 'long' position or exit it based on whether the two lines have crossed each other. It goes 'long when the Fast Moving Average crosses above the Slow Moving Average. This could indicate upwards momentum in prices in the future. It then exits the position when the the Fast Moving Average crosses back below. This could indicate downwards momentum in prices in the future. This is only speculative, though, but sometimes it can be a very good indicator/strategy to predict future action.
I've tried some strategy settings and I found different promising strategies. Here are a few:
BTCUSD ( BitStamp ) 1 Day Timeframe : EMA, Fast length 25 bars, Slow length 62 bars => 28,792x net profit (default)
BTCUSD ( BitStamp ) 1 Day Timeframe : VWMA, Fast length 21 bars, Slow length 60 bars => 15,603x net profit
BTCUSD ( BitStamp ) 1 Day Timeframe : SMA, Fast length 18 bars, Slow length 51 bars => 19,507x net profit
BTCUSD ( BitStamp ) 1 Day Timeframe : RMA, Fast length 20 bars, Slow length 52 bars => 5,729x net profit
BTCUSD ( BitStamp ) 1 Day Timeframe : WMA, Fast length 29 bars, Slow length 60 bars => 19,869x net profit
Features:
-You can choose your preferred moving average: SMA , EMA , WMA , RMA & VWMA .
-You can change the length average for each moving average
-I made the background color Green when you're currently in a long position and Red when not. I made it so you can see when you'd be actively in a trade or not. The Red and Green background colors can be toggled on/off in order to see other indicators more clearly overlayed in the chart, or if you prefer a cleaner look on your charts.
-I also have a plot of the Fast moving average and Slow moving average together. The Opening moving average is Purple, the Closing moving average is White. White on top is a sign of a potential upswing and purple on top is a sign of a potential downswing. I've made this also able to be toggled on/off.
Let me know if you think I should change anything with my script, I'm always open to constructive criticism so feel free to comment below :)
Divonn1994
Close v Open Moving Averages Strategy (Variable) [divonn1994]This is a simple moving average based strategy that works well with a few different coin pairings. It takes the moving average 'opening' price and plots it, then takes the moving average 'closing' price and plots it, and then decides to enter a 'long' position or exit it based on whether the two lines have crossed each other. The reasoning is that it 'enters' a position when the average closing price is increasing. This could indicate upwards momentum in prices in the future. It then exits the position when the average closing price is decreasing. This could indicate downwards momentum in prices in the future. This is only speculative, though, but sometimes it can be a very good indicator/strategy to predict future action.
What I've found is that there are a lot of coins that respond very well when the appropriate combination of: 1) type of moving average is chosen (EMA, SMA, RMA, WMA or VWMA) & 2) number of previous bars averaged (typically 10 - 250 bars) are chosen.
Depending on the coin.. each combination of MA and Number of Bars averaged can have completely different levels of success.
Example of Usage:
An example would be that the VWMA works well for BTCUSD (BitStamp), but it has different successfulness based on the time frame. For the 12 hour bar timeframe, with the 66 bar average with the VWMA I found the most success. The next best successful combo I've found is for the 1 Day bar timeframe with the 35 bar average with the VWMA.. They both have a moving average that records about a month, but each have a different successfulness. Below are a few pair combos I think are noticeable because of the net profit, but there are also have a lot of potential coins with different combos:
It's interesting to see the strategy tester change as you change the settings. The below pairs are just some of the most interesting examples I've found, but there might be other combos I haven't even tried on different coin pairs..
Some strategy settings:
BTCUSD (BitStamp) 12 Hr Timeframe : 66 bars, VWMA=> 10,387x net profit
BTCUSD (BitStamp) 1 Day Timeframe : 35 bars, VWMA=> 7,805x net profit
BNBUSD (Binance) 12 Hr Timeframe : 27 bars, VWMA => 15,484x net profit
ETHUSD (BitStamp) 16 Hr Timeframe : 60 bars, SMA => 5,498x net profit
XRPUSD (BitStamp) 16 Hr Timeframe : 33 bars, SMA => 10,178x net profit
I only chose these coin/combos because of their insane net profit factors. There are far more coins with lower net profits but more reliable trade histories.
Also, usually when I want to see which of these strategies might work for a coin pairing I will check between the different Moving Average types, for example the EMA or the SMA, then I also check between the moving average lengths (the number of bars calculated) to see which is most profitable over time.
Features:
-You can choose your preferred moving average: SMA, EMA, WMA, RMA & VWMA.
-You can also adjust the previous number of calculated bars for each moving average.
-I made the background color Green when you're currently in a long position and Red when not. I made it so you can see when you'd be actively in a trade or not. The Red and Green background colors can be toggled on/off in order to see other indicators more clearly overlayed in the chart, or if you prefer a cleaner look on your charts.
-I also have a plot of the Open moving average and Close moving average together. The Opening moving average is Purple, the Closing moving average is White. White on top is a sign of a potential upswing and purple on top is a sign of a potential downswing. I've made this also able to be toggled on/off.
Please, comment interesting pairs below that you've found for everyone :) thank you!
I will post more pairs with my favorite settings as well. I'll also be considering the quality of the trades.. for example: net profit, total trades, percent profitable, profit factor, trade window and max drawdown.
*if anyone can figure out how to change the date range, I woul really appreciate the help. It confuses me -_- *
Trend Follower Strategy v2 [divonn1994]The Trend Follower Strategy that I made classifies red and green candles into tiny, small, and big sizes and will send buy or sell signals depending on if the candle is classified as "big" so you get into and out of a position when there is a big candle. Out during a big green candle to take profit. Out during a big red candle in case the market is turning down. It also won't enter a position unless there is positive EMA momentum.
For the chart there is a Buy and a Sell signal. Buy = 1, Sell = 0, and when the value crosses above or below 0.5 it will trigger a long position or close the long position. The graph isn't necessary to the strategy, but can help with visualizing the trade patterns in the past if you like.
This strategy works best so far with these coins at time of posting (March 4th, 2022):
KCSUSDT (621x profit), HTUSDT (45x profit), LUNAUSDT (45x profit), BNBBTC (1553x profit), ETHBTC (219x profit), KCSBTC (1222x profit), LUNABTC (83x profit), FTMBTC (52x profit).
It can work with other pairings, but I personally like these pairings best. I didn't test it with coins outside of the top 100 coins by market cap. Use it however you want.
Works best on 1 Day charts.
The strategy would rather be in the market than out. It gets out when it see's a red flag, but can immediately go back in in the next bar if the red flags are all gone. So it makes a lot of trades.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update: This is the same strategy I uploaded before but I made the code Open for anyone to check it out and so it has a similar description as the previous version. Let me know what you think. I'd remove the old version if I could, but I guess it's site policy to not be able to remove scripts that have been uploaded.
Trend Follower Strategy [divonn1994]The Trend Follower Strategy that I made classifies red and green candles into tiny, small, and big sizes and will send buy or sell signals depending on if the candle is classified as "big" so you get into and out of a position when there is a big candle. Out during a big green candle to take profit. Out during a big red candle in case the market is turning down. It also won't enter a position unless there is positive EMA momentum.
For the chart there is a Buy and a Sell signal. Buy = 1, Sell = 0, and when the value crosses above or below 0.5 it will trigger a long position or close the long postion. The graph isn't necessary to the strategy, but can help with visualizing the trade patterns in the past if you like.
This strategy works best so far with BNBUSDT, ETHUSDT, KCSUSDT, HTUSDT, BNBUSDT, BNBBTC, ETHBTC, KCSBTC, LUNABTC, SOLBTC, ADABTC, SANDBTC, HNTBTC, KDABTC.
It can work with other pairings, but these have the healthiest charts in my opinion, as in, the profit factor is high and is greater than a simple buy and hold strategy, and the largest drawdown isn't very high.
Works best on 1 Day charts.