How can I get the pip-size for bricks on a Renko chart?
How can I get the pip-size for bricks on a Renko chart?
10 Jul 2020, 12:45
Does anybody know if there is an API which can tell me the brick size (in pips) for a renko chart?
To clarify, when I set my chart to renko (on the top chart-type selector), I'd like to retrieve the value set for pip size programatically.
Thank you for any hints :-)
Replies
koktos632
13 Jul 2020, 08:59
RE:
2 PanagiotisCharalampous
How to know the Renko chart is selected, please?
@koktos632
PanagiotisCharalampous
13 Jul 2020, 09:48
Hi koktos632,
You can check the Timeframe property.
Best Regards,
Panagiotis
@PanagiotisCharalampous
rgasch
13 Jul 2020, 10:54
RE:
Simple and effective, thank you very much!
PanagiotisCharalampous said:
Hi rgasch,
Just get one of the previous bricks and check the difference in pips between the open and close prices e.g.
var size = Math.Abs(Bars.ClosePrices.Last(1) - Bars.OpenPrices.Last(1)) / Symbol.PipSize;
Best Regards,
Panagiotis
@rgasch
rgasch
16 Jul 2020, 00:43
RE:
The formula/code you provided makes perfect sense, but for some reason I have a USDCAD chart (renko size = 5 pips) where this returns "10" as a result. Any ideas what could be causing this?
Thank you in advance
PanagiotisCharalampous said:
Hi rgasch,
Just get one of the previous bricks and check the difference in pips between the open and close prices e.g.
var size = Math.Abs(Bars.ClosePrices.Last(1) - Bars.OpenPrices.Last(1)) / Symbol.PipSize;
Best Regards,
Panagiotis
@rgasch
PanagiotisCharalampous
16 Jul 2020, 08:42
Hi rgasch,
It works fine for me. Can you provide some more information e.g. the code you are using, screenshots etc?
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
13 Jul 2020, 08:55
Hi rgasch,
Just get one of the previous bricks and check the difference in pips between the open and close prices e.g.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous