Support Board
Date/Time: Mon, 25 Nov 2024 03:33:01 +0000
Post From: drawing a marker, issues with repeated drawing
[2023-10-04 09:20:53] |
User138457 - Posts: 38 |
hi, following Using Drawing Tools From an Advanced Custom Study I use the following code to draw a marker, when the bottom of a bar shows a finished auction s_UseTool Tool; int UniqueLineNumber = 74191;//any random number. //Tool.Clear(); // Reset tool structure. Good practice but unnecessary in this case. Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_MARKER; Tool.LineNumber = UniqueLineNumber +1; Tool.BeginDateTime = sc.BaseDateTimeIn[sc.Index]; Tool.BeginValue = sc.Low[sc.Index]-0.5; Tool.Color = RGB(0,200,200); Tool.AddMethod = UTAM_ADD_OR_ADJUST; Tool.MarkerType = MARKER_X; Tool.MarkerSize = 8; Tool.LineWidth = 5; sc.UseTool(Tool); However, this only gives a marker on the most recent bar that fulfills (worse: "had fullfilled sometime during bar formation") this condition. What do I need to change to "keep" the drawings? Addtionally, is there a way to NOT draw during bar formation but only for finished bars? Otherwise I would need to delete the drawing again, when the bar has a finished auction somewhen during bar formation, but not at its close. |