I made a new project with only the due date as a goal to put in an indicator, not in an EA,
In the EA it works normally, when the license expires it removes the Robot from the chart, through this line of code " (ExpertRemove() ".
How do I put this same code in an indicator? The image and complete code are attached.
Thank you very much in advance...
if (TimeCurrent() > D'2023.09.09' || TimeLocal() > D'2023.09.09')
{
Alert ("The trial version has expired at "+TimeToString(D'2023.09.09', TIME_DATE)+"");
ExpertRemove();
}