Credits to HPotter for the orginal code. Credits to Yo_adriiiiaan for recently publishing the UT Bot study based on the original code. Credits to @TradersAITradingPlans for making UT Bot strategy.
Strategy fixed with time period by Kirk65.
UT Bot works great with 2 hour time frame with Heikin Ashi, but riskier. Use "Once per bar" In alerts with 1.5% stoploss. If the price goes against Alerts, stoploss will save your assets. Wait until next Alert. 4 hour time frame is less risky and less profitable.