Login Page - Create Account

Support Board


Date/Time: Sun, 08 Sep 2024 00:10:04 +0000



[API] Concerning +/- slope color/direction on study in general

View Count: 913

[2015-04-01 22:43:31]
MiiMeldon - Posts: 2
Hi. I have recently installed and setup SierraCharts and another platform that uses SierraCharts, InfinityAT, and am wondering how in the API do we determine the positivity or negativity of a curve of a study, in general? For instance, an 8 EWA plotted on the chart, we set black for when it is negatively sloped and red for positively sloped. How do you programmatically access the current color (+/- direction state) of a given study laid on a chart? I don't think comparing bars/candles with previous ones would suffice, because that is not really the same thing. I am assuming the developer of a given indicator/study specifies when a color is to change, or SierraCharts somehow determines this. The strategy relies on the + or - state of a curve of two studies/indicators to function, and must be according to the reported and drawn color of said indicators. Is there an API callback or method for this? This is really important for the strategy to even work. I am assisting a live trader develop his strategy in to an automated setup and am looking to trade soon myself live, but it is crucial for the correct functionality before considering using the platform.

Thanks in advance.

- David
[2015-04-02 03:00:29]
Sierra Chart Engineering - Posts: 104368
This is just simply a matter of comparing the study values from bar to bar or at a particular bar to another particular bar in the past. Is one equal to the other, greater than or less than the other. This is all.

Documentation to access studies is here:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILProgrammingConcepts.html#UsingStudyData
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-02 03:19:23]
MiiMeldon - Posts: 2
Thanks, but sorry if I am still not convinced, I just need to confirm because I am somewhat confused.

I am going to define a black curve (say, EWA) as negatively sloped and red on same curve as positively (upward) curve. Say it is black (downward trend) and the market begins in the upward direction causing the comparison of current bar with previous bar to be equal, which color is the curve now? Black or red? What is the determining factor SierraCharts uses when drawing *any* curve of *any* study/indicator with the user's color? So does SierraCharts simply compare bars as you suggest? If you are certain of this or can confirm this then I will take it as the answer. I am just somewhat at a loss, mainly because of two possible scenarios in general (but not necessarily your trading platform which is why this needs to be clarified):

1) A custom study/indicator, as developed by third-party, or any study/indicator for that matter, determines positivity (upward color) and negativity (downward color) on its own accord and reports back to SierraCharts for it to plot in these colors as governed by the study itself.

2) SierraCharts simply compares values in the curve's data array to determine color of curve at any point (lexeme) on the chart as per your instruction "a matter of comparing the study values from bar to bar or at a particular bar to another particular bar in the past."

So the actual scenario would be the second (2), correct?

Thanks again!

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

Login

Login Page - Create Account