Klamath Falls OR
Posts: 60 since Apr 2020
Thanks Given: 21
Thanks Received: 80
|
How do I work with times? There's no help from MC documentation, I found some builtin indicators that use time but it didn't help me, and online C# documentation for DateTime is so confusing & complex I gave up trying to understand it.
I'm making a simple indicator that plots vertical lines to mark the day session start-time & end-time. MC (and most other software) doesn't have a builtin indicator to do this [lame].
*******************
my code so far:
[Input] public int StartTime {get;set;}
...
StartTime= 800; //8:00 AM, I only need to input hours & minutes
...
if(Bars.Time[0] >= StartTime){ //this won't compile obviously
//I draw a vertical line to mark the start of the day session, I know how to do this part
}
*******************
Can anyone tell me how to code this?
Thanks!
|