Enable and disable the Pop-up

 
Hello everyone. I have a problem with the code, and I need your help.

I wrote this code:

{
         Buffer1[i] = Low[i]- 1 * myPoint; 
        if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "Buy"); time_alert = Time[0]; } 
        }


The part that I have highlighted, brings up the Popup. I wish I could turn on and off from outside the appearance of the pop-up.
Thank you all, Massimo.

 

Put an input

input bool PopUp=false;

and in your code

    if(PopUp && i == 0 && Time[0] != time_alert) 

.

 
Hello GumRai, thanks for your reply !!!
Reason: