tradefy: input parameter opentime = "12:00" (??)
When dealing with time, a lot of people use strings; they can not be optimized. Using (int) seconds or (double) hours and fraction can be inputs.
input string opentime = "12:00"; ... { datetime time = TimeLocal(); string hoursAndMinutes = TimeToString(time,TIME_MINUTES); if (hoursAndMinutes == opentime) //do what you want here } ...
simply define time as a string... Just you need to make sure entries are double digit format.(hh & mm)
William Roeder #:
When dealing with time, a lot of people use strings; they can not be optimized. Using (int) seconds or (double) hours and fraction can be inputs.
Strings are nice in settings. I use strings in the settings, and in OnInit I convert them to an integer format, which allows me to maintain high performance.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
//Global paramters//
input parameter opentime = "12:00" (??)
if ((StringSubstr(hoursAndMinutes, 0, 5) == "07:00")
How can I replace 07:00 with an input parameter?
{//Buy Trade logic}//
Thank you very much!