How to write code run file script when pressed button?

 
I'm a beginner. I create EA  I want create  button click to run the script. How to write?

Help me please. Thank you.
 

OnInit

if(ObjectFind(Button)<0) ObjectCreate(Button)

ObjectSet*(Whatever you want the Button to look like)

OnChartEvent

if(id==ObjectClick && sparam=Button)

<your script as a function>

https://www.mql5.com/en/docs/function_indices

Documentation on MQL5: List of MQL5 Functions
Documentation on MQL5: List of MQL5 Functions
  • www.mql5.com
Reads from the file of the CSV type a string of one of the formats: "YYYY.MM.DD HH:MM:SS", "YYYY.MM.DD" or "HH:MM:SS" - and converts it into a datetime value
Reason: