In my previous post (https://www.daily-edge.com/forum/rsi-atr-divine-tm/rsi-atr-divine-for-xbtusd-1m-bitmex-settings) I gave a set of parameters (ATR-Divine) to trade BTC. So far I've realized that it works really well, giving stable gains mainly when the trend is steady. The main drawdowns come at the trend flips. Consider it works with an agressive RSI (length=2) so the Target 1 and Target 2 trades are many times opened far from the long/short stop, so in a trend flip loses are huge. This cannot be accepted as it is, risk-reward ratio must be at least 1:1. This is enough for a strategy that gives 80-90% profitable trades.
I'm in the process to automate it with Alertatron, so far tests are being succesful and the bot is behaving fast and accurate with Bybit exchange. This is how I designed a good strategy, accounting for some changes on the "default" way to operate RSI-ATR Divine (from the long side, equivalent in the short side)
1) Swing trades: Take the swing trade given by the strategy, and update the stop (given by the major ATR line) at every attempt to open pyramid trades (double arrow). It happens often at every level change.
2) Target 1 and Target 2 trades: At the initial trade (after the trend flip) they are open automatically (since there are no open trades). Targets are given by "Target 1" and "Target 2" variables. Now, instead of placing stop at the same level as the swing trade, we set a trailing stop with a 1% distance. This is about 80-90 usd at current prices. Target 1 is usually at this distance (with multiplier of Minor ATR=1), and Target 2 is approximately double. This gives a risk-reward ratio of 1:1 and 1:2. Otherwise we could have ratios like 5:1 or higher. And yes, it's better to be stopped out once with as much as a -1% loss than have a -5% loss if trend flips. Once opened the position, if trend is good there shouldn't be drawdowns in the position greater than 70-80 usd. If it's not, trade is closed and we wait below to open a new trade at a cheaper price.
Of course if Target 1 is reached but not Target 2, we can open another Target 1 trade as many times strategy gives a double arrow. If Target 2 is reached right after Target 1, we will open 2 new trades at the following double arrow. This is the basics of pyramiding.
3) We do not open any new trades (excepting swing trade which is open during all the trend) if price gets beyond the Minor ATR band, that is, the shadowed zone in the chart. At this point we have been stopped out and it's likely to be a trend flip soon.
4) If a double arrow appears between the shadowed zone and the ATR Minor Reverse line (which appears when shadowed zone is hit), we will only open Target 1 trades. We are in a "warning" zone, so we must be cautious. Shadowed zone is a "forbidden" area for trading and above ATR Minor Reverse line it disappears and we are in the normal trade zone.
5) Scalp entries are disabled
ALERTATRON
This strategy works well on Alertatron. With some logic everything can be built in few alerts and operated by the bot. I'm still developing the pyramiding parameters according to what I exposed above, but it's quite rightforward. An example for Initial entry could be as follows:
Initial Long Building #bot
Bybittest(BTCUSD){
market(side=buy, amount=3000);
stopMarket(side=sell, amount=1000, offset={{plot("Long Stop")}}, tag="Swing Stop");
limit(side=sell, amount=1000, offset=@{{plot("Target 1")}}, tag="Target 1");
trailingStop(side=sell, amount=1000, offset=1%, trigger=last, tag="T1 TS");
limit(side=sell, amount=1000, offset=@{{plot("Target 2")}}, tag="Target 2");
trailingStop(side=sell, amount=1000, offset=1%, trigger=last, tag="T2 TS");
}
In this alert a market order is made to buy 3000 contracts, 1000 for swing trade, 1000 for Target 1 and 1000 for Target 2. In future updates this function will be given to limit risk, but at the moment it works well, Alertatron is quite fast executing orders at the exchange.
First, after the buy, we set the stop for the swing trade, which will be updated at every double arrow (that's why it's important to add a tag, to cancel it later and give a new value). Later we set the limit order and trailing stop for Target 1 and Target 2.
Any feedback will be appreciated, thanks for reading!
To update the Swing Stop, you would want to use the "Update Stop" alert that fires in trading view each time there is a new stop update. You would probably want to add an "if" statement in the alertatron instruction to check that you are actually in a Swing trade. Bybittest(BTCUSD){ # Check that the swing trade exists and is active, abort if not continue(if=positionGreaterThanEq, value=1000); # Cancel the previous tagged trailing stop order
cancel(which=tagged, tag="Swing Stop");
# Update the stop trailingStop(side=sell, amount=1000, offset=@{{plot("Long Stop")}}, tag="Swing Stop"); } Make sure to include the '@' symbol ahead of the {{plot("Long Stop")}} placeholder inside the Trading View alert message. This forces the Alertatron bot to use an exact price value as the stop. I would use a trailing stop order in this case and not a regular stop.