Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 22:03:43 +0000



DateTime and Time to Start

View Count: 876

[2016-10-07 21:45:30]
Fabrizio88 - Posts: 10
Hi,
i'm a question..
how can start and stop study for time?

i don't interest Data Years Month and Daily...

  SCDateTime TimeStart = SCDateTime(, , , 0, 0, 0);
  SCDateTime TimeStop = SCDateTime(, , , 0, 0, 0);
  SCDateTime TimeNow = sc.CurrentSystemDateTime;

  if (TimeNow >= TimeStart && TimeNow <= TimeStop) Enable = true;

Thanks..
[2016-10-08 00:55:56]
Sierra Chart Engineering - Posts: 104368
This is how you need to do it:


if (TimeNow.GetTime() >= TimeStart.GetTime() && TimeNow.GetTime() <= TimeStop.GetTime())
Enable = true;

Reference:
Working with the SCDateTime Variables and Values
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account