Add Lines to Chart Using Robot
Add Lines to Chart Using Robot
08 Oct 2018, 12:30
Hello everyone,
I would like my robot to draw one horizontal line on the chart. The problem using ChartObjects.DrawHorizontalLine is, that the lines are removed when I stop the robot. Do you have any idea, how to prevent that?
I have also thought about creating an indicator to draw the lines, but then I don't know how to add an indicator to the chart using a robot. Do you know, how I can call an indicator froma robot? This indicator should remain in place after stopping the robot too.
Thank you very much in advance.
Replies
yisrgg
08 Oct 2018, 13:15
RE:
Panagiotis Charalampous said:
Hi fcomanjoncabeza,
For a line to stay on the chart you need to make it interactive. See how below.
var line = Chart.DrawHorizontalLine("Test", Symbol.Bid, Color.AliceBlue); line.IsInteractive = true;Best Regards,
Panagiotis
Thank you very much. Do you have any alternative for the API version 3.0?
Kind regards
@yisrgg
PanagiotisCharalampous
08 Oct 2018, 14:05
Hi fcomanjoncabeza,
No this feature has been introduced in v3.01. It will be released to brokers soon.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
08 Oct 2018, 12:37
Hi fcomanjoncabeza,
For a line to stay on the chart you need to make it interactive. See how below.
Best Regards,
Panagiotis
@PanagiotisCharalampous