[laoowai]BNB_USDT_3m_3Commas_Bollinger_MACD_RSI_StrategyBNB_USDT _3m
Release Notes:
Time: 3min
Pair: BNB_USDT
Use: {{strategy.order.alert_message}}
What's the difference with 3Commas Bollinger Strategy by tedwardd:
1. Initial capital: 1210 USDT (10$ Base order / 400$*3 Safety order), if you will change, please change JUST safety order volume or number of safety orders 2-3
2. Using just 2(3) safety order (original script 4)
3. More high-performance strategy for BNB_USDT
4. Using MACD to sell order (original script take profit by scale), thanks Drun30 .
5. Using RSI to analyze the market conditions.
Need to change:
bot_id = input(title="3Commas Bot ID", defval=" YOUR DATA ")
email_token = input(title="Bot Email Token", defval=" YOUR DATA ")
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FAQ copy from tedwardd
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This strategy is intended for use as a way of backtesting various parameters available on 3commas.
The primary inputs for the strategy are:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// USER INPUTS
Short MA Window - The length of the Short moving average
Long MA Window - The length of the Long moving average
Upper Band Offset - The offset to use for the upper bollinger offset
Lower Band Offset - The offset to use for the lower bollinger offset
Long Stop Loss % - The stop loss percentage to test
Long Take Profit % - The Take profit percentage to test
Initial SO Deviation % - The price deviation percentage required to place to first safety order
Safety Order Vol Step % - The volume scale to test
3Commas Bot ID - (self-explanatory)
Bot Email Token - Found in the deal start message for your bot (see link in the previous section for details)
3Commas Bot Trading Pair - The pair to include for composite bot start deals (should match the format of 3commas, not TradingView IE. USDT_BTC not BTCUSDT )
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Start Date, Month, Year and End Date, Month, and Year all apply to the backtesting window. By default, it will use as much data as it can give the current period select (there is less historical data available for periods below 1H) back as far as 2016 (there appears to be no historical data on Trading view much before this). If you would like to test a different period of time, just change these values accordingly.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Composite bot using a Bollinger band type trading strategy. While its primary intention is to provide users a way of backtesting bot parameters, it can also be used to trigger a deal start by either using the {{strategy.order.alert_message}} field in your alert and providing the bot details in the configuration screen for the strategy or by including the usual deal start message provided by 3commas.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Original script:
1. 3Commas Bollinger Strategy by tedwardd
2. Momentum Strategy ( BTC /USDT; 1h) - MACD (with source code) by Drun30
Moving Averages
72s Strat: Backtesting Adaptive HMA+ pt.1This is a follow up to my previous publication of Adaptive HMA+ few months ago, as a mean to provide some kind of initial backtesting tools. Which can be use to explore many possible strategies, optimise its settings to better conform user's pair/tf, and hopefully able to help tweaking your general strategy.
If you haven't read the study or use the indicator, kindly go here first to get the overall idea.
The first strategy introduce in this backtest is one most basic already described in the study; buy/sell is when movement is there and everything is on the right side; When RSI has turned to other side, we can use it as exit point (if in profit of course, else just let it hit our TP/SL, why would we exit before profit). Also, base on RSI when we make entry, we can further differentiate type of signals. --Please check all comments in code directly where the signals , entries , and exits section are.
Second additional strategy to check; is when we also use second faster Adaptive HMA+ for exit. So this is like a double orders on a signal but with different exit-rule (/more on this on snapshots below). Alternatively, you can also work the code so to only use this type of exit.
There's also an additional feature which you can enable its visuals, the Distance Zone , is to help measuring price distance to our xHMA+. It's just a simple atr based envelope really, I already put the sample code in study's comment section, but better gonna update it there directly for non-coder too, after this.
In this sample I use Lot for order quantity size just because that's what I use on my broker. Also what few friends use while we forward-testing it since the study is published, so we also checked/compared each profit/loss report by real number. To use default or other unit of measurement, change the entry code accordingly.
If you change your order size, you should also change the commission in Properties Tab. My broker commission is 5 USD per order/lot, so in there with example order size 0.1 lot I put commission 0.5$ per order (I'll put 2.5$ for 0.5 lot, 10$ for 2 lot, and so on). Crypto usually has higher charge. --It is important that you should fill it base on your broker.
SETTINGS
I'm trying to keep it short. Please explore it further again. (Beginner should also first get acquaintance with terms use here.)
ORDERS:
Base Minimum Profit Before Exit:
The number is multiplier of ongoing ATR. Means that when basic exit condition is met, algo will check whether you're already in minimum profit or not, if not, let it still run to TP or SL, or until it meets subsequent exit condition, then it will check again.
Default Target Profit:
Multiplier of ATR at signal. If reached before any eligible exit condition is met, exit TP.
Base StopLoss Point:
You can change directly in code to use other like ATR Trailing SL, fix percent SL, or whatever. In the sample, 4 options provided.
Maximum StopLoss:
This is like a safety-net, that if at some point your chosen SL point from input above happens to be exceeding this maximum input that you can tolerate, then this max point is the one will be use as SL.
Activate 2nd order...:
The additional doubling of certain buy/sell with different exits as described above. If enable, you should also set pyramiding to at least: 2. If not, it does nothing.
ADAPTIVE HMA+ PERIOD
Many users already have their own settings for these. So in here I only sample the default as first presented in the study. Make it to your adaptive.
MARKET MOVEMENT
(1) Now you can check in realtime how much slope degree is best to define your specific pair/tf is out of congestion (yellow) area. And (2) also able to check directly what ATR lengths are more suitable defining your pair's volatility.
DISTANCE ZONE
Distance Multiplier. Each pair/tf has its own best distance zone (in xHMA+ perspective). The zone also determine whether a signal should appear or not. (Or what type of signal, if you wanna go more detail in constructing your strategy)
USAGE
(Provided you already have your own comfortable settings for minimum-maximum period of Adaptive HMA+. Best if you already have backtested it manually too and/or apply as an add-on to your working strategy)
1. In our experiences, first most important to define is both elements in the Market Movement Settings . These also tend to be persistent for whole season since it's kinda describing that pair/tf overall behaviour. Don't worry if you still get a low Profit Factor here, but by tweaking you should start to see positive changes in one of Max Drawdown and Net Profit, or Percent Profitable.
2. Afterwards, find your pair/tf Distance Zone . When optimising this, what we seek is just a "not to bad" equity curves to start forming. At least Max Drawdown should lessen more. Doesn't have to be great already, but should be better, no red in Net Profit.
3. Then go manage the "Trailing Minimum Profit", TP, SL, and max SL.
4. Repeat 1,2,3. 👻
5. Manage order size, commission, and/or enable double-order (need pyramiding) if you like. Check if your equity can handle max drawdown before margin call.
6. After getting an acceptable backtest result, go to List of Trades tab and find the biggest loss or when many sequencing loss in a row happened. Click on it to go to exact point on chart, observe why the signal failed and get at least general idea how it can be prevented . The rest is yours, you should know your pair/tf more than other.
You can also re-explore your minimum-maximum period for both Major and minor xHMA+.
Keep in mind that all numbers in Setting are conceptually in a form of range . You don't want to get superb equity curves but actually a "fragile" , means one can easily turn it to disaster just by changing only a fraction in one/two of the setting.
---
If you just wanna test the strength of the indicator alone, you can disable "Use StopLoss" temporarily while optimising settings.
Using no SL might be tempting in overall result data in some cases, but NOTE: It is not recommended to not using SL, don't forget that we deliberately enter when it's in high volatility. If want to add flexibility or trading for long-term, just maximise your SL. ie.: chose SL Point>ATR only and set it maximum. (Check your max drawdown after this).
I think this is quite important specially for beginners, so here's an example; Hypothetically in below scenario, because of some settings, the buy order after the loss sell signal didn't appear. Let's say if our initial capital only 1000$ using leverage and order size 0,5 lot (risky position sizing already), moreover if this happens at the beginning of your trading season, that's half of account gone already in one trade . Your max SL should've made you exit after that pumping bar.
The Trailing Minimum Profit is actually look like this. Search in the code if you want to plot it. I just don't like too many lines on chart.
To maximise profit we can try enabling double-order. The only added rule coded is: RSI should rising when buy and falling when sell. 2nd signal will appears above or below default buy/sell signal. (Of course it's also prone to double-loss, re-check your max drawdown after. Profit factor play its part in here for a long run). Snapshot in comparison:
Two default sell signals on left closed at RSI exit, the additional sell signal closed later on when price crossover minor xHMA+. On buy side, price haven't met our minimum profit when first crossunder minor xHMA+. If later on we hit SL on this "+buy" signal, at least we already profited from default buy signal. You can also consider/treat this as multiple TP points.
For longer-term trading, what you need to maximise is the Minimum Profit , so it won't exit whenever an exit condition happened, it can happen several times before reaching minimum profit. Hopefully this snapshot can explain:
Notice in comparison default sell and buy signal now close in average after 3 days. What's best is when we also have confirmation from higher TF. It's like targeting higher TF by entering from smaller TF.
As also mention in the study, we can still experiment via original HMA by putting same value for minimum-maximum period setting. This is experimental EU 1H with Major xHMA+: 144-144, Flat market 13, Distance multiplier 3.6, with 2nd order activated.
Kiwi was a bit surprising for me. It's flat market is effectively below 6, with quite far distance zone of 3.5. Probably because I'm using big numbers in adaptive period.
---
The result you see in strategy tester report below for EURUSD 15m is using just default settings you see in code, as follow:
0,1 lot for each order (which is the smallest allowed by my broker).
No pyramiding. Commission: 0.5 usd per order. Slippage: 3
Opening position is only using basic strategy #1 (RSI exit). Additional exit not activated.
Minimum Profit: 1. TP: 3.
SL use: Half-distance zone. Max SL: 4.5.
Major xHMA+: 172-233. minor xHMA+: 89-121
Distance Zone Multiplier: 2.7
RSI: Standard 14.
(From our forward-testing, the difference we get from net profit is because of the spread, our entry isn't exactly at the close/open price. Not so much though, but not the same. If somebody can direct me to any example where we can code our entry via current bid/ask price, that would be awesome!)
It's already a long post (sorry), think I'm gonna pause here. Check out the code :)
---
DISCLAIMER: Past performance is no guarantee of future results , and so on.. you know the drill ;)
Please read whole description first before using, don't take 1-2 paragraph and claim it's the whole logic, you are responsible of your own actions and understanding.
Trailing Take Profit Trailing Stop LossThis script demonstrated a dual trailing take profit and stop loss strategy. Where you take 50% (configurable) of the profit when a price level is reached and then you get the rest when a trailing stop loss is hit.
Trailing Take ProfitThis script demonstrates how to do trailing take profit. With this approach instead of setting a limit order, when you hit the target you just follow the price upwards (for long positions) and you sell when the price drops by a small percentage. This approach will increase the profits (slightly) in every strategy! Be aware that the simulated data may produce unrealistic results.
Fibonacci candle with Fibonacci ema strategyFor this strategy I am making use of the fibonacci numbers until 10 sequences and I am using them to make an avg candle and an average ema.
With it, I combine multiple price action rules and I set it up to only go long. When we have a short , we exit from the trade.
From the initial tests, it looks like it performs better on big timeframes.
If you have any questions, let me know !
Extremely Overfit Bitcoin Long/ShortThis is a highly overfit (in my opinion) script to long/short BTC on the 15m time frame. May be usable for other cryptocurrencies or timeframes with some parameter adjustments. I backtested it on a few exchanges with ETH.
The simplest way to increase the number of trades is to decrease the "FastChannelLength" parameter or increase the "SlowChannelLength" parameter, or both. Decreasing the margins of the channels also increases the number of trades. In GENERAL, you should expect that adding more trades will hurt profitability, because, as the title says, this script is extraordinarily overfit.
It does include a commission fee from the start, which I find is essential to not providing an overly rosy view of how a strategy would work.
Dales BarUpDn Strategylong and short buy orders. the option to connect a 3commas bot to it with just the settings box
MA Crossover Strategy with MA Turning Point Exits + ADX filterThis strategy is based upon @rthomson's MA Crossover Strategy with MA Turning Point Exits.
I just added an ability to filter out entries when ADX < 20. In fact you have a choice to set this ADX threshold value.
In a sideways market, the MA crossovers end up in yielding entry trades with losses. ADX value around 20 to 25 indicates a sideway market. By introducing ADX threshold, we are trying to prevent potential loss making entries.
MA Crossover Strategy with MA Turning Point Exits + ADX filterThis strategy uses @rthomson's "MA Crossover Strategy with MA Turning point Exits" and combines it with ADX.
This strategy filters out any entries where ADX < 20. In fact you can set the value for ADX threshold. (Generally value under 20 for ADX is considered as non trend zone)
Altcoin correlation MeterDear TV'ers,
Hereby a script where the relative strength of an (in this case) altcoin is measured. The script produces a correlation between the altcoin and total altcoin market (Total2 index, see script). Using this script you can see when there is a strong correlation between the two and when there isn't. Moreover, it also produces long/short signals using hull moving average crossover.
Long signals are produced when correlation is below 0 and the hma of the pair is higher than the lagging hma.
Short signals are produced when correlation is below 0 and the hma of the pair is lower than the lagging hma.
Short/Long is closed after correlation is going back towards a set correlation target as well as the Take profit percentage is reached.
In the above example the script is applied to one of my favorite altcoin projects (rose).
Looking forward to feedback/suggestions.
4X EMA and volume strategyThis is a strategy made from multiple types of EMA and volume(EOM).
This is a long only strategy.
EMA 1 = 13
EMA 2 = 21
EMA 3 = 50
EMA 4 = 180
In this case we have 2 options for entry:
1.We check that are candles are in ascending order and EOM is above 0 - > long, descending and eom<0 -> exit long
2.We check if we have a crossover between the first ema with the second and the third. Cross up -> long, crossdown -> exit long
If you have any questions let me know!
Combo Backtest 123 Difference between price and MA This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Percent difference between price and MA
WARNING:
- For purpose educate only
- This script to change bars colors.
Excitement - Crypto Surfer v1For those of us who need more excitement in our crypto journey besides just HODL, here’s a simple crypto robot that trades on the hourly (1H) candles. I call it the Crypto Surfer because it uses the 20 and 40 EMAs (Exponential Moving Averages) to decide when to enter and exit; price tends to “surf” above these EMAs when it is bullish, and “sink” below these EMAs when it is bearish. An additional 160 SMA (Simple Moving Average) with slope-angle detection, was added as a bull / bear filter to reduce the sting of drawdowns, by filtering-out long trades in a prolonged bear market.
USER NOTES:
- This script will buy $10,000 USD worth of crypto-currency per trade.
- It will only open one trade at a time.
- It has been backtested on all the high market cap coins such as Bitcoin, Ethereum, Binance Coin, Polkadot, Cardano.
- It should be run on the Hourly (H1) chart.
- In general, this moving average strategy *should be* profitable for 80% to 90% of the coins out there
- The 160 SMA filter with slope angle detection is designed to stop you from going long in a bear market.
- It is recommended you copy this script and modify it to suit your preferred coin during backtesting, before running live.
- Trading is inherently risky (exciting), and I shall not be liable for any losses you incur, even if these losses are due to sampling bias.
T3 crossover strategyHi everybody,
Hereby a simple strategy based on T3 moving average crossover. If people are interested we can also add some alerts in people are interested.
Hi-Lo Channel StrategyHaven't seen a strategy quite like it. Buy when Heikin Ashi candle closes above a moving average that is sourced on highs - Sell when Heikin Ashi candle closes above a moving average that is sourced on lows. Moving average length should be between 5 and 20 ideally.
NOTE: the Heikin Ashi close values are calculated when the box is checkmarked. You do not need to view the chart with Heikin Ashi candles enabled on the chart. The buy and sell points of the strategy do not change whether or not you are viewing Heikin Ashi candles on the chart as long as the Heikin Ashi setting is enabled.
Full CRYPTO pack macd, rsi, obv, ema strategyThis is a simple, yet very efficient crypto strategy, adapted to 4h time frame, on big coins like ETH and BTC. However it can be adapted to other markets, timeframes etc
For this strategy I use a combination of a trend line, an oscillator, price action and volume.
This strategy has both the opportunity to go long and short.
As well, it has a leverage simulator .
The rules are the next ones:
Long : we check that current candle is ascending and above the moving average, the macd is in positive range, rsi is below overbought level and volume is bigger than the moving avg of volume.
For short, we have the opposite long rules.
If you have any questions, please let me know !
MACD oscillator with EMA strategy 4H This is a simple, yet efficient strategy, which is made from a combination of an oscillator and a moving average.
Its setup for 4h candles with the current settings, however it can be adapted to other different timeframes.
It works nicely ,beating the buy and hold for both BTC and ETH over the last 3 years.
As well with some optimizations and modifications it can be adapted to futures market, indexes(NASDAQ,NIFTY etc), forex(GBPUSD), stocks and so on.
Components:
MACD
EMA
Time condition
Long/short option
For long/exit short we enter when we are above the ema, histogram is positive and current candle is higher than previous.
For short /exit long , when close below ema, histo negative and current candles smaller than previous
If you have any questions please let me know !
Scalping Dips On Trend (by Coinrule)Coinrule's Community is an excellent source of inspiration for our trading strategies.
In these months of Bull Market, our traders opted mostly on buy-the-dips strategies, which resulted in great returns recently. But there has been an element that turned out to be the cause for deep division among the Community.
Is it advisable or not to use a stop-loss during a Bull Market?
This strategy comes with a large stop-loss to offer a safer alternative for those that are not used to trade with a downside protection.
Entry
The strategy buys only when the price is above the Moving Average 50 , making it less risky to buy the dip, which is set to 2%.
The preferred time frame is 1-hour.
The stop-loss is set to be quite loose to increase the chances of closing the trade in profit, yet protecting from unexpected larger drawdowns that could undermine the allocation's liquidity.
Exit
Stop loss: 10%
Take Profit: 3%
In times of Bull Market, such a trading system has a very high percentage of trades closed in profit (ranging between 70% to 80%), which makes it still overall profitable to have a stop-loss three times larger than the take profit.
Pro tip: use a larger stop-loss only when you expect to close in profit most of the trades!
The strategy assumes each order to trade 30% of the available capital and opens a trade at a time. A trading fee of 0.1% is taken into account.
Bollinger Bands Trending Reverse StrategyWelcome to yet another script. This script was a lot easier since I was stuck for so long on the Donchian Channels one and learned so much from that one that I could use in this one.
This code should be a lot cleaner compared to the Donchian Channels, but we'll leave that up to the pro's.
This strategy has two entry signals, long = when price hits lower band, while above EMA, previous candle was bearish and current candle is bullish.
Short = when price hits upper band, while below EMA, previous candle was bullish and current candle is bearish.
Take profits are the opposite side's band(lower band for long signals, upper band for short signals). This means our take profit price will change per bar.
Our stop loss doesn't change, it's the difference between entry price and the take profit target divided by the input risk reward.
Strategy NNFX Tester Strategy NNFX, Baseline, QQEs Fast C1, Slow C2, ATR, Volume and Exit
This is a Strategy Tester designed to work with Study (Alerts) of the same.
At time of creation based on Revision 8 of the Study.
DO NOT USE the Currency/Money Management section under settings. use the position sizing under "Inputs" - "Money Management" - "Risk per trade" which is defaulted to 2%
This has adjustable Baselines, Exits, ATR calculations, C1 and C2 are currently QQE & QQE Histo with adjustable settings but I'll include more choice of C1 & C2 as time goes on.
Find settings that work for you, then move them over to the Study version for best results.
Forward plans are to add much more options to both Alert/Strategy.
If anyone wants to collaborate or anything hit me up.
dEMA w/ VWAP filterBuy when EMA is below VWAP and starts sloping up
Sell when EMA is above VWAP and starts sloping down
TemaI have found that such simple crossover can show good results. Basically it has only 2 TEMA and nothing more. I don't know what else to write here. The code is simplest and has only one filter, which take into consideration the direction of chart.