Alert for TMA Band Indicator

Winner99

Trader
May 20, 2021
6
0
7
47
Hi, I would like to modify the indicator TMA Centered Bands (MT5) with alerts when the arrows appeared.
However, without the programming background, I'm unable to code the indicator after few days of trying.
I've attached herewith the original indicator tma centered bands, and also attached the file modified by me but doesn't work properly.
Besides, please advise any issue with the copyright of mladen if we do the modification. If yes, I will delete my post immediately.
Thank you.
 

Attachments

  • tma centered bands arr with Alerts.mq5
    10.3 KB · Views: 71
  • tma centered bands arr.mq5
    8.3 KB · Views: 42

Winner99

Trader
May 20, 2021
6
0
7
47
I think the problem is that you are checking whether a buffer value (e.g., ReboundU[TriggerCandle]) is greater than 0, when in fact you have to check if it is not equal to EMPTY_VALUE.
Thank you for your reply.
I have modified the alerts section in the indicator as below:
if ((ReboundU[TriggerCandle] > EMPTY_VALUE) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != 1))))
{
I have tried but it is still not working, as I may not get what you mean with my limited knowledge in programming.
Appreciate you could explain in more detail.
Thank you.
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,614
1,366
144
Odesa
www.earnforex.com
Thank you for your reply.
I have modified the alerts section in the indicator as below:
if ((ReboundU[TriggerCandle] > EMPTY_VALUE) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != 1))))
{
I have tried but it is still not working, as I may not get what you mean with my limited knowledge in programming.
Appreciate you could explain in more detail.
Thank you.
> is a "greater than" sign, you need !=, which is a "not equal" sign.