Static Chart Objects

Created at 20 Aug 2020, 12:10
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!
afhacker's avatar

afhacker

Joined 15.10.2015

Static Chart Objects
20 Aug 2020, 12:10


Please add static chart objects like static text, so developers will be able to draw any of the charts objects statically fixed on top/bottom/left/right/center chart.

It will be useful for lots of indicators like volume profile, custom volume indicators,...

Now it's possible but the developer must handle the chart scrolling event and move the objects whenever the chart is scrolled, its slow and costumes lots of resources, you can easily add new overloads for chart object drawing methods that will accept static positions (horizontal, vertical) instead of x and y points.

For example (this rectangle will be fixed on the left side of the chart):

var horizontalStartPosition = HorizontalAlignment.Left;

var objectLength = 20; // it can be either in bar numbers or a time span object

var objectTop = 1.2345; // this will be in price
var objectBottom = 1.2230 // in price 

var rectangle = Chart.DrawRectangle(objectName, horizontalStartPosition, objectLength, objectTop, objectBottom, color, thickness, linestyle);

 


cTrader Automate
@afhacker