Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 00:30:53 +0000



sc.BaseDateTimeIn question

View Count: 892

[2015-04-27 05:04:02]
enemyspy - Posts: 304
I am wondering if anyone can help me with this small chunk of code...see the line with a bunch of asterisks beside it.
The time value that shows up on the subgraph/spreadsheet, returns a date value with time 0:00:00. Would it have anything to do with trying to place it in a float array?


else if(bkt[j] >0 && (zclass[j] ==3 || zclass[j] == 4)) //if we have an downside breakout
     {
      for (int k = i+1; k < sc.ArraySize; k++) //find stuff
       {
          
         if(hi[k]>Patthi[j])
         {
        dead[j] =1;
        deadx[j] = sc.BaseDateTimeIn.TimeAt(j);//************
          
        }
          
      }
      if(dead[j] == 0)
      {
        d1[j] = d1[i-1]+1;
       }
      else
      {
        d1[j] =d1[j-1];
      }
      
    }
Date Time Of Last Edit: 2015-04-27 05:15:41
[2015-04-27 07:07:30]
Sierra Chart Engineering - Posts: 104368
For more information, refer to this page here:
https://www.sierrachart.com/index.php?page=doc/doc_SCDateTime.html
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
[2015-04-27 18:58:56]
enemyspy - Posts: 304
is there an indicator in the source code that exemplifies how you get the date time at the current index and pass it into a subgraph?
[2015-04-27 19:52:47]
Sierra Chart Engineering - Posts: 104368
This will not work accurately and once the Date and Time are in the Subgraph, they could not be displayed since there is no support for that.
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
[2015-04-27 20:30:10]
enemyspy - Posts: 304
Ok so without using a subgraph is it possible to store the accurate value using a nested for loop where:

for (int j = sc.Index; j >0; j--)
{
if() //something happens
{
for (int k = i+1; k < sc.ArraySize; k++)
{
if()//something happens

some_kind_of_array_that_is_not_a_subgraph[j] = thetimestamp[k])


without printing the time stamp in a Subgraph, is it possible to compare the
[2015-04-28 18:22:37]
Sierra Chart Engineering - Posts: 104368
You could use persistent SCDateTime variables. The function for this is documented here:
https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Functions.html#scGetPersistentInt
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