Support Board
Date/Time: Mon, 07 Jul 2025 06:22:07 +0000
Post From: Synchronous ASCIL method to draw on a chart on demand?
[2014-11-09 18:54:11] |
maxima120 - Posts: 151 |
Thank you.. I believe I followed both of your advices. But I dont get any markers. I never used Tools in ASCIL before.. Would appreciate a bit of further help.. if (sc.SetDefaults) { sc.GraphName = "StudyCrossMarker2 (using tools to plot on another chart)"; sc.GraphRegion = 0; sc.FreeDLL = 1; sc.AutoLoop = 0; sc.CalculationPrecedence = LOW_PREC_LEVEL; ... } ... if(xUp) { LongCross[sc.Index] = sc.Close[sc.Index]; SCFloatArray otherChart; sc.GetStudyArrayFromChartUsingID(otherChartReference.GetChartStudySubgraphValues(), otherChart); int otherChartNumber = otherChartReference.GetChartNumber(); int otherChartIndex = sc.GetContainingIndexForDateTimeIndex(otherChartNumber, sc.Index); // s_UseTool Tool; Tool.Clear(); Tool.ChartNumber = otherChartNumber; Tool.DrawingType = DRAWING_MARKER; Tool.LineNumber = toolIndex++; Tool.BeginIndex = otherChartIndex; Tool.BeginValue = otherChart[otherChartIndex]; Tool.Color = RGB(0,200,0); Tool.AddMethod = UTAM_ADD_OR_ADJUST; Tool.MarkerType = MARKER_POINT; Tool.MarkerSize = 80; Tool.LineWidth = 50; sc.UseTool(Tool); // SCString message; message.Format("LONG. Other chart: number %d index %d value %f. Tool number %d.", otherChartNumber, otherChartIndex, otherChart[otherChartIndex], Tool.LineNumber); sc.AddMessageToLog(message, 0); } Chart: Replay 30.0X: Chart #7 | Study: StudyCrossMarker2 (using tools to plot on another chart) | LONG. Other chart: number 10 index 949 value 1925.000000. Tool number 135. | 2014-11-09 18:38:50 Chart: Replay 30.0X: Chart #7 | Study: StudyCrossMarker2 (using tools to plot on another chart) | LONG. Other chart: number 10 index 949 value 1925.000000. Tool number 136. | 2014-11-09 18:38:50 Chart: Replay 30.0X: Chart #7 | Study: StudyCrossMarker2 (using tools to plot on another chart) | LONG. Other chart: number 10 index 949 value 1925.000000. Tool number 137. | 2014-11-09 18:38:50 The chart number and the value seems very much correct. The study is applied on chart 7 and supposed to draw on chart 10.. But there is nothing (I set large marker size to make sure I can see it !! :)) |