Adding label above horizontal line

Created at 28 May 2015, 12:52
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
bosma's avatar

bosma

Joined 25.12.2014

Adding label above horizontal line
28 May 2015, 12:52


Is it possible to add a label to sit above a horizontal line?


@bosma
Replies

LSR2412
28 May 2015, 13:58

 var prvdaySeries = MarketData.GetSeries(Symbol.Code.ToString(), TimeFrame.Daily);

 ChartObjects.DrawHorizontalLine("PreviousdayHigh1", prvdaySeries.High.Last(1), Colors.DarkGray, 1, LineStyle.Lines);
ChartObjects.DrawText("prvdayHtext1", "H " + prvdaySeries.High.Last(1).ToString(), index + 2, prvdaySeries.High.Last(1), VerticalAlignment.Top, HorizontalAlignment.Right, Colors.Red);

here is example for drawing horizontal line at level of previous day..and above line is text "H + previous day high level"

maybe this helps


@LSR2412