TradingView
StrategiesForEveryone
25 févr. 2023 22:38

Strategy for UT Bot Alerts indicator  

Bitcoin all time history indexINDEX

Description

Using the UT Bot alerts indicator by @QuantNomad, this strategy was designed for showing an example of how this indicator could be used, also, it has the goal to help some people from a group that use to use this indicator for their trading. Under any circumstance I recommend to use it without testing it before in real time.

Backtesting context: 2020-02-05 to 2023-02-25 of BTCUSD 4H by Tvc. Commissions: 0.03% for each entry, 0.03% for each exit. Risk per trade: 2.5% of the total account

For this strategy, 3 indicators are used:
  • UT Bot Alerts indicator by Quantnomad
  • One Ema of 200 periods for indicate the trend
  • Atr stop loss from Gatherio


Trade conditions:

For longs:
  • Close price is higher than Atr from UT Bot
  • Ema from UT Bot cross over Atr from UT Bot.

This gives us our long signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as buy (open long position)
The other half will be closed when close price is lower than Atr and Ema from UT Bot cross under Atr. This will be showed as cl buy (close long position)

For shorts:
  • Close price is lower than Atr from UT Bot
  • Ema from UT Bot cross over Atr from UT Bot.

This gives us our short signal. Stop loss will be determined by atr stop loss (white point), break even(blue point) by a risk/reward ratio of 0.75:1 and take profit of 3:1 where half position will be closed. This will be showed as sell (open short position)
The other half will be closed when close price is higher than Atr and Ema from UT Bot cross over Atr. This will be showed as cl sell (close short position)

Risk management

For calculate the amount of the position you will use just a small percent of your initial capital for the strategy and you will use the atr stop loss for this.
Example: You have 1000 usd and you just want to risk 2,5% of your account, there is a long signal at price of 20,000 usd. The stop loss price from atr stop loss is 19,000. You calculate the distance in percent between 20,000 and 19,000. In this case, that distance would be of 5,0%. Then, you calculate your position by this way: (initial or current capital * risk per trade of your account) / (stop loss distance).
Using these values on the formula: (1000*2,5%)/(5,0%) = 500usd. It means, you have to use 500 usd for risking 2.5% of your account.
We will use this risk management for apply compound interest.
In settings, with position amount calculator, you can enter the amount in usd of your account and the amount in percentage for risking per trade of the account. You will see this value in green color in the upper left corner that shows the amount in usd to use for risking the specific percentage of your account.

Script functions
  • Inside of settings, you will find some utilities for display atr stop loss, break evens, positions, signals, indicators, etc.
  • You will find the settings for risk management at the end of the script if you want to change something. But rebember, do not change values from indicators, the idea is to not over optimize the strategy.
  • If you want to change the initial capital for backtest the strategy, go to properties, and also enter the commisions of your exchange and slippage for more realistic results.
  • In risk managment you can find an option called "Use leverage ?", activate this if you want to backtest using leverage, which means that in case of not having enough money for risking the % determined by you of your account using your initial capital, you will use leverage for using the enough amount for risking that % of your acount in a buy position. Otherwise, the amount will be limited by your initial/current capital
  • ---> Do not forget to deactivate Trades on chart option in style settings for a cleaner look of the chart <---


Some things to consider

USE UNDER YOUR OWN RISK. PAST RESULTS DO NOT REPRESENT THE FUTURE.
DEPENDING OF % ACCOUNT RISK PER TRADE, YOU COULD REQUIRE LEVERAGE FOR OPEN SOME POSITIONS, SO PLEASE, BE CAREFULL AND USE CORRECTLY THE RISK MANAGEMENT
Do not forget to change commissions and other parameters related with back testing results!
Strategies for trending markets use to have more looses than wins and it takes a long time to get profits, so do not forget to be patient and consistent !
---> The strategy can still be improved, you can change some parameters depending of the asset and timeframe like risk/reward for taking profits, for break even, also the main parameters of the UT Bot Alerts <----

Notes de version

Just a small change. Now you can use a stop loss based in last swing high/low :)

Notes de version

You can now choose if you want to use take profits or not. This is useful in some assets like Banknifty with stoplosses based in last swing high/low
Commentaires
Late369
Hey man, can u help configurate this , and whats the best timeframe ?
pardhu3369
does it repaint?
ckeller72
@pardhu3369, I think it does repaint
ToumaBer61
@ckeller72, Excuse me for the ignorance, but what does "repaint" mean? I read that many times on the comment section, but have no clue about it´s meaning.
StrategiesForEveryone
@ToumaBer61, Repainting means that a strategy wrong programmed is showing better results that are not correct in the real time. It sometimes happens due to some code that can cause this. But in this case it doesn´t happen :)
StrategiesForEveryone
I already tested the strategy in real time and used the original indicator in bars replay (configured with the same values) and I didn´t see any repainting. If you have seen any trouble in a specific asset or timeframe, please let me know to trying to solve it. The strategy is calculated each second so probably you must wait for the candle close :)
KarlssonMiguel
Thanks for the wonderful work!
There is the possibility of putting purchase and sale alerts such as take profit to automate your strategy in 3 commas
Thank you so much!!!!
CharmyDexter
Amazing!!! A UT Bot version I can actually use. This is the best because it filters the signals with ema so less false signals 👍 Thank you! Please I want to make a request if you could create a study version of this with alert like in older versions: Buy, Sell alerts. 🙏
StrategiesForEveryone
@CharmyDexter, you can activate alerts based on the operation of the strategy :)
namitamitjain
G
Plus