Support Board
Date/Time: Sat, 08 Feb 2025 12:05:21 +0000
Post From: s_UseTool in multiple GraphRegions on same chart does not render
[2020-07-06 03:44:39] |
mm3599 - Posts: 13 |
I'm using the s_UseTool object on 2 studies. One study is added to GraphRegion 0 Another study is added to GraphRegion 1 Each study uses the same method for creating a tool. Study 1 Function: s_UseTool CreateTextUseToolFunc(SCStudyGraphRef sc, SCString SDRangeValue, float loc, int Index) {
s_UseTool Tool; Tool.Clear(); Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_TEXT; Tool.BeginIndex = Index; Tool.BeginValue = loc; Tool.LineNumber = Index; Tool.Color = RGB(0,200,200); Tool.Text = SDRangeValue; Tool.LineWidth = 7; Tool.Region = 0; Tool.AddMethod = UTAM_ADD_OR_ADJUST; return Tool; } This calls function 1: s_UseTool new_text_tool = CreateTextUseToolFunc(sc, Output1, Array_MACDP_PLL_SD3_Range_Location[sc.Index], sc.Index);
int line_number; line_number = new_text_tool.LineNumber; sc.UseTool(new_text_tool); Study 2 Function: s_UseTool CreateTextUseToolROCFunc(SCStudyGraphRef sc, SCString last_pll_roc_diff, float loc, int Index) {
s_UseTool Tool2; Tool2.Clear(); Tool2.ChartNumber = sc.ChartNumber; Tool2.DrawingType = DRAWING_TEXT; Tool2.BeginIndex = Index; Tool2.BeginValue = loc; Tool2.LineNumber = Index; Tool2.Color = RGB(0,200,200); Tool2.Text = last_pll_roc_diff; Tool2.LineWidth = 7; Tool2.Region = 1; Tool2.AddMethod = UTAM_ADD_OR_ADJUST; return Tool2; } This calls function 2: s_UseTool new_text_tool_roc = CreateTextUseToolROCFunc(sc, Output2, Array_Subgraph_ROC_Last_PLL_Diff_Location[sc.Index], sc.Index); int line_number2; line_number2 = new_text_tool_roc.LineNumber; sc.UseTool(new_text_tool_roc); The s_UseTool study added to GraphRegion 1: a) does not render b) causes the s_UseTool on GraphRegion 0 to not render When I use s_UseTool on GraphRegion 0 by itself, s_UseTool renders correctly Date Time Of Last Edit: 2020-07-06 13:22:17
|