Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 04:46:50 +0000



ACSIL question

View Count: 1279

[2014-01-28 17:49:54]
User40117 - Posts: 56
hi,

making first steps in ACSIL
i'm trying to create an indicator but didn't get the results i wanted, so for debugging and checking my input i tride printing values to the log.


float MyFloat = (sc.BaseData[SC_CLOSE][sc.Index]);
SCString Buffer;
Buffer.Format("Value: %f", MyFloat);
sc.AddMessageToLog(Buffer,0);


This should print the CLOSE but they don't seem to match real close prices.
FDAX is around +9000, the printed messages range from 50 to +1000 ???
what am i'm doing wrong here ?

[2014-01-28 17:51:43]
Sierra Chart Engineering - Posts: 104368
That code does look correct.
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
[2014-01-28 18:33:37]
User40117 - Posts: 56

but this is the result ???

Chart: GER30 5 Min #1 | Study: Channel | Value: 22.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 38.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 44.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 29.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 29.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 33.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 25.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 28.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 31.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 34.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 48.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 38.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 33.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 35.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 56.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 63.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 41.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 29.000000 | 2014-01-28 18:31:27
Chart: GER30 5 Min #1 | Study: Channel | Value: 6.000000 | 2014-01-28 18:31:27

[2014-01-28 18:36:46]
User40117 - Posts: 56
and when i just change SC_CLOSE into SC_HIGH it seems correct ???


Chart: GER30 5 Min #1 | Study: Channel | Value: 9364.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9363.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9364.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9355.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9353.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9337.000000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9360.500000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9365.500000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9366.500000 | 2014-01-28 18:34:55
Chart: GER30 5 Min #1 | Study: Channel | Value: 9363.500000 | 2014-01-28 18:34:55

[2014-01-28 19:45:24]
vegasfoster - Posts: 444
This may be not be the cause of your problem, but I've had problems before as well using SC_CLOSE in basedatain so I use SC_LAST and that seems to always work ok.
[2014-01-28 20:19:18]
User40117 - Posts: 56
Thx, will try it
[2014-01-28 21:23:16]
Sierra Chart Engineering - Posts: 104368
Not sure unless we were to test this with the exact same study function.

We see no reason why there would be a problem.
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
Date Time Of Last Edit: 2014-01-28 21:23:26
[2014-01-28 21:24:25]
Sierra Chart Engineering - Posts: 104368
We did not catch on to this earlier, but SC_CLOSE is not valid. That is some other value defined by the Windows operating system. You need to use SC_LAST.
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
Date Time Of Last Edit: 2014-01-28 21:24:36

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

Login

Login Page - Create Account