Topics
23 Nov 2019, 14:19
 9
 1442
 1
Replies

hackmushroom
23 Nov 2019, 20:42

RE: RE: RE: RE:

FireMyst said:

alex_mihail said:

FireMyst said:

 

If you want to draw text on a chart, Chart.DrawText is your friend:

Example:

Chart.DrawText("X text", "X", MarketSeries.Close.Count - 1, Symbol.Bid, Color.Goldenrod);

You can also search for examples:

https://ctrader.com/search?q=DrawText

Not text - I want to draw a shape ("X" for example) on the candlestick when the price crosses over Hull MA.

Then you have to draw lines. But you'll have to decide how far you want the lines to extend, and how steep ofan angle to form the "x". For instance, you might have to draw one line with the coordinates (x-2, priceCrossPoint + 2) and (x+2, priceCrossPoint - 2). That will draw from top left to bottom right. You'll have to do the same for the other leg.

The DrawText approach is a lot simpler to get started so you can see if you like how it's working. Then from there I would graduate to drawing the lines to form the X.

I know you want to draw an x but using DrawText has the advantage of being simpler and also has horizontal and vertical alignment. You can also us unicode characters to get a proper cross. Just use \u2716 as the text string for example. more example unicode crosses here - https://en.m.wikipedia.org/wiki/X_mark


@hackmushroom

hackmushroom
23 Nov 2019, 16:40

This would be a fantastic feature but the resources required to test multiple symbols, especially using tick data, would take forever even on a decent rig. So this links nicely into my suggestion for GPU/Network optimisation/backtesting here: https://ctrader.com/forum/suggestions/22362

Please upvote


@hackmushroom

hackmushroom
04 Nov 2019, 14:17

RE:

Panagiotis Charalampous said:

Hi ctid1542722,

Thanks for posting in our forum. Indicators referenced by cBots do not display on the chart. If you need the indicator to display on order to cross check your results, you will need to add the indicator to the chart manually.

Best Regards,

Panagiotis

Thanks,

That makes sence. 


@hackmushroom