Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 07:02:41 +0000



Display drawings from another chart

View Count: 859

[2020-02-28 23:19:25]
maxpi - Posts: 175
I set one chart to display drawings from another. It works fine with a manually added drawing but the drawings I add with ACSIL do not display whether added as user drawings or not..
[2020-02-29 12:46:05]
maxpi - Posts: 175
sc.GetUserDrawnChartDrawing(sourceChart, DRAWING_RECTANGLE_EXT_HIGHLIGHT, DrawingObject, drawingIndex)

The above code, properly formatted, never returns a drawing so it's not a matter of how the drawings are mapped. The source chart has a different symbol but when I check off "show chart drawings for different symbols" drawings still do not show up. I would not think that a differing symbol would affect the above code's ability to get a drawing from another chart. My code that places the drawings uses Tool.BeginIndex instead of Begin.DateTime, that might affect the ability to transfer drawings using chart settings but not the above line of code...
[2020-02-29 13:04:50]
maxpi - Posts: 175
The code that places the drawings works fine either using Begin/EndIndex or BeginEndDateTime but the drawings never get transferred to the other chart
[2020-02-29 13:08:44]
maxpi - Posts: 175
The chart containing the drawings is formed from the SC Data -All Services feed and the chart that I want to receive the data from is formed from CQG data feed. I did check off "show chart drawings for different symbols" setting...
[2020-02-29 13:30:00]
maxpi - Posts: 175
I switched the drawings to DRAWING_RECTANGLEHIGHLIGHT instead of DRAWING_RECTANGLE_EXT_HIGHLIGHT and used sc.Index as their EndIndex and something strange is happening; they are ending at different places on the chart when they all should be ending at the most recent bar. I cobbled the data together using Edit-Join Intraday Data and joined several ES contracts at tick level using rollover rules for transition. Something seems to be wrong with the data when the right end of my rectangles are specified to be at sc.Index but are at different places on the chart...
[2020-02-29 13:31:50]
maxpi - Posts: 175
when I was using DRAWING_RECTANGLE_EXT_HIGHLIGHT and my code ensured that the end index was always greater than the begin index one of the extended rectangles would draw to the left...
[2020-02-29 18:37:54]
maxpi - Posts: 175
I'm looking at the data using the Edit/Download data intraday chart tool and the places that are substituting for sc.Index look normal. I'll try stitching together the data using 1min bars instead of tick data to see what happens...
[2020-02-29 19:10:14]
maxpi - Posts: 175
The data is not the problem. I fixed my code that places the rectangles and they draw fine. They still do not show on the other chart when a hand drawn one does...
[2020-02-29 19:21:52]
maxpi - Posts: 175
I've gone through the documentation regarding settings, the two charts are set to the same range bar value. I've never had a problem detecting a drawing on another chart using ACSIL or using the built in facility to see drawings from another chart...
[2020-02-29 20:07:45]
maxpi - Posts: 175
this code running on the chart the drawings are on, chart#1, can discover the drawings: It logs all the drawing indexes
int drawingIndex =0;
while(sc.GetUserDrawnChartDrawing(sc.ChartNumber, DRAWING_RECTANGLE_EXT_HIGHLIGHT,
DrawingObject, drawingIndex))
{
  MessageText.Format("drawingIndex %i", drawingIndex);
  sc.AddMessageToLog(MessageText, 0);
  drawingIndex++;
}

this similar code running on chart#3 cannot discover the drawings on chart#1
drawingIndex =0;
while(sc.GetUserDrawnChartDrawing(1, DRAWING_RECTANGLE_EXT_HIGHLIGHT,
DrawingObject, drawingIndex))
{
  MessageText.Format("drawingIndex %i", drawingIndex);
  sc.AddMessageToLog(MessageText, 0);
  drawingIndex++;
}

It might be that the code can't recognize chart #1?
[2020-03-02 00:30:43]
maxpi - Posts: 175
I use the sc.GetLineNumberOfSelectedUserDrawnDrawing(); command, log the reported drawing numbers and they all return "1". My code draws a few rectangles, they show up on the chart, no matter which one I select the above command returns a "1". I just don't get this...
[2020-03-02 04:39:43]
Sierra Chart Engineering - Posts: 104368
There are way too many postings here and we have not reviewed them all.

Have a look at this ACSIL s_UseTool structure member variable:
Using Drawing Tools From an Advanced Custom Study: s_UseTool::AllowCopyToOtherCharts

My code that places the drawings uses Tool.BeginIndex
So you know, there is no performance benefit to using indexes when the drawing is considered a user drawn type of drawing.
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: 2020-03-02 04:49:13

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

Login

Login Page - Create Account