Support Board
Date/Time: Sat, 11 Jan 2025 04:52:53 +0000
Post From: Retracement Levels.
[2016-10-21 01:20:44] |
User429169 - Posts: 14 |
Using sierra API, This code displays on one side. How to display Values or Text on both sides of bars. Tool.Clear(); // reset tool structure for our next use Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_RETRACEMENT; Tool.ExtendLeft = 1; // .ExtendLeft = 1;// Extend the horizontal retracement lines to the left of the chart region. Tool.ExtendRight = 1; int &LineNumber4 = sc.GetPersistentInt(4); if (LineNumber4 != 0) Tool.LineNumber = LineNumber4; // Update BarIndex to 40 bars from the end BarIndex = sc.ArraySize - 40; BarIndex = max(BarIndex, 0); Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex]; Tool.EndDateTime = sc.BaseDateTimeIn[sc.ArraySize - 1]; Tool.BeginValue = sc.High[sc.ArraySize - 1]; Tool.EndValue = sc.Low[BarIndex]; Tool.Color = RGB(255, 0, 255); // Magenta Tool.AddMethod = UTAM_ADD_OR_ADJUST; for (int i = 0; i < 16; i++) Tool.RetracementLevels = i * 10.0f; Tool.ShowPrice = 1; Tool.ShowPercent = 1; Tool.RoundToTickSize = 0; Tool.TextAlignment = DT_VCENTER; // label vertical alignment sc.UseTool(Tool); LineNumber4 = Tool.LineNumber;//Remember line number which has been automatically set Thank You. |