Login Page - Create Account

Support Board


Date/Time: Tue, 22 Apr 2025 12:22:08 +0000



Post From: Acsil SCDateTime

[2023-03-04 19:30:45]
Tahir - Posts: 35
Hi everyone, I'm trying to write a code that plots overnight low with conditional statement but I cant seem to get my head around SCDateTime variables.

this code code doesn't seem to work, it stops plotting too early. If I take the minute out then it plots it at 09 but the minute variable messes things up. Help would be appreciated!
SCDateTime BarDateTime = sc.BaseDateTimeIn;
      int Hour = BarDateTime.GetHour();
      int Minute =BarDateTime.GetMinute();
      
      if (Hour < 09 && Minute <30)
        {
          if (thisLow < prevLow)
          {
            dailyLow= sc.Low;
          }
        }