Login Page - Create Account

Support Board


Date/Time: Fri, 04 Oct 2024 14:35:21 +0000



[User Discussion] - Using extra array from another study

View Count: 1328

[2014-11-14 23:55:47]
User43906 - Posts: 4
Hello, i need to call another study and extract an extra array (four position)

The call is:
sc.GetStudyExtraArrayFromChartUsingID(sc.Input[2].GetChartNumber(), sc.Input[0].GetInt(), 0, 4, StudyReference1);
In the other study I set muy values in ZigZagPeakValue array

  SCFloatArrayRef ZigZagPeakType = ZigZagLine.Arrays[0]; // ZigZagPeakType : +1=high peak, -1=low peak, 0=not peak
  SCFloatArrayRef ZigZagPeakIndex = ZigZagLine.Arrays[1]; // ZigZagPeakIndex: index of current peak, -1=no peak yet
  SCFloatArrayRef ZigZagReset = ZigZagLine.Arrays[2]; // ZigZagReset: 0=no reset, 1=reset
  SCFloatArrayRef ZigZagTrend = ZigZagLine.Arrays[3]; // ZigZagTrend: 0=none, 1=confirmed up, -1=confirmed down
  SCFloatArrayRef  ZigZagPeakValue = ZigZagLine.Arrays[4];
I set values in this form:

ZigZagPeakValue[ZigZagIndex] = 4;
When I read

float ValorStudy1 = StudyReference1[sc.Index];
The value is allways cero

Thanks!
Date Time Of Last Edit: 2014-11-14 23:59:07
[2014-11-18 01:40:39]
Sierra Chart Engineering - Posts: 104368
The most likely reason for this is you are not finding the corresponding index in the Study Subgraph array the code is referencing from another chart, since it is from another chart and the array does not match with the destination chart.


Refer to this page for more information:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILRefOtherTimeFrames.php
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-11-24 17:42:09
[2014-11-21 16:02:14]
User43906 - Posts: 4
Ok thanks a lot!

I think i'm not setting well the Study/Price Overlay, In the standard procedence which one i need to choose in the Based On option? Then, in Study Overlay option i choose of course the one i need to call and then in the call i set the Study Id of this (Study/Price Overly)?
How does the parameter chart number work?

Thanks for your help!
[2014-11-24 17:44:23]
Sierra Chart Engineering - Posts: 104368
Study/Place Overlay does not required to use the Based On setting.

Then, in Study Overlay option i choose of course the one i need to call and then in the call i set the Study Id of this (Study/Price Overly)?
Yes, this is right. To reference the data from the Study/Price Overlay study, use sc.GetStudyArrayUsingID. Since the data is on the same chart.
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