ToTime()
<< Click to Display Table of Contents >> ToTime() |
Calculates an integer value representing a time.
Note: Integer representation of time is in the format Hmmss where 7:30 AM would be 73000 and 2:15:12 PM would be 141512. |
An int value representing a time structure
time |
A DateTime structure to calculate Note: See also the Time property |
hour |
An int value representing the hour used for the input |
minute |
An int value representing the minute used for the input |
second |
An int value representing the second used for the input |
Tip: NinjaScript uses the .NET DateTime structure which can be complicated for novice programmers. If you are familiar with C# you can directly use DateTime structure properties and methods for date and time comparisons otherwise use this method and the ToDay() method. |
// Only trade between 7:45 AM and 1:45 PM |
//store start time as an int variable to be compared |