ChartObjects.DrawText Obsolete

16 May 2019, 12:32ChartObjects.DrawText Obsolete#1
Patrick posts: 114since: 15 Nov 2017

Hello Panagiotis

The code bellow prints text on top center of the screen. 

ChartObjects.DrawText("Buy", buy_score.ToString() + "  ▲", StaticPosition.TopCenter, Colors.Green);

However I got some warings:

Error CS0618: 'cAlgo.API.Internals.Algo.ChartObjects' is obsolete: 'Use Chart instead.'

Error CS0618: 'cAlgo.API.Internals.ChartObjects.DrawText(string, string, cAlgo.API.StaticPosition, cAlgo.API.Colors?)' is obsolete: 'Use Chart.DrawStaticText instead.'

Error CS0618: 'cAlgo.API.Internals.ChartObjects.DrawText(string, string, cAlgo.API.StaticPosition, cAlgo.API.Colors?)' is obsolete: 'Use Chart.DrawStaticText instead.'

Any suggestions?

Thank you 

Patrick

16 May 2019, 12:39#2
Panagiotis Charalampousposts: 3022since: 13 Jan 2017

Hi Patrick,

I am not sure what suggestions do you need. The warnings are clear. You shoud use  Chart.DrawStaticText() instead.

Best Regards,

Panagiotis


Head of Community Management at cTrader
16 May 2019, 12:43RE:#3
Patrick posts: 114since: 15 Nov 2017

oops, sorry about that, somehow I missed this "Use Chart.DrawStaticText"!

Thank you

PAtrick

 

 

Panagiotis Charalampous said:

Hi Patrick,

I am not sure what suggestions do you need. The warnings are clear. You shoud use  Chart.DrawStaticText() instead.

Best Regards,

Panagiotis