Download MetaTrader 5

How to Add a time stamp?

To add comments, please log in or register
creep01
22
creep01  
I have these conditions that if it is there on M5, I set it to hit a switch. Then when M1 hits the same conditions, a popup alert will come out with a sound.

How do I code it that the indicator takes down the time M5 hit the conditions, and if possible how do I add 30 minutes to that? (and display that on the popup)

I'm new to coding thanks so much guys :)
Keith Watford
Moderator
10566
Keith Watford  

Save TimeCurrent() + (30*60) in a global variable ie. gv

Then check for when TimeCurrent() >=gv

Use TimeToStr(gv) to print in the alert 

creep01
22
creep01  
Thank you!
To add comments, please log in or register