TradingView Indicator Debugging and Enhancement

Job ID: 39041625

Budget: $10 – $30 USD

I have developed a simple indicator on TradingView that generates buy and sell labels and alarms based on the intersection of three exponential moving averages (EMAs). Currently, there is an issue where the labels disappear if the direction of the EMAs changes after the label is generated and the alarm is sent. This disappearance happens only on the latest candle.

Please run this indicator on a 1-minute timeframe and monitor the buy and sell alarms for 2-3 hours. Then, manually match the alarms with the labels on the chart retrospectively. Normally, the sequence should alternate regularly between buy and sell (e.g., buy, sell, buy, sell). However, you'll notice that some alarms do not correspond to any visual labels, suggesting that labels are disappearing.

The alarms are intended to trigger trading actions via the WunderTrading bot, managing only one open trade at a time in a long-short cycle. The problem is specific to the most recent candle. To resolve this, I need a Pine Script that ensures the permanence of labels once they are created and an alarm is sent. This adjustment is crucial for maintaining the intended trading cycle.
Related categories: Python Metatrader Pine Script Trading MetaTrader 4