Custom chart Candle Close

 

Hi, does anyone know how to get the candle close from a non time based custom chart such as renko ? iClose and Copyclose doesn't work.

thanks.

 
Sie Samuel Roland Youl: Hi, does anyone know how to get the candle close from a non time based custom chart such as renko ? iClose and Copyclose doesn't work. thanks.
Yes, they do work! Custom symbols work like any other symbol. You must be doing something incorrectly in your code.
 

I understand what you mean, I think i didn't well explained my issue. 

Supposed I generate a renko chart on M1, when I use iClose, they value I get is based on time instead of renko candle close. I have some function that should be executed one the tradable chart after a renko Candle close 

We all know renko is based on price and it can take up to 1 hour or more to generate a new candle.  But in my case, if I'm on M1, I noticed that the iClose only record the last price as closing price after every minute. The same way if I'm on M5 only the last price after each 5 minutes is recorded as closing price. 

I wonder if it is because the the iClose require a time frame in his statement. 

Double Candle close = iClose (_Symbol,TimeFrame,0);
//--- I tried to remove the time frame settings but it return an error.

That is why I'm asking if there is a function that can get the candle closing time without taking into account the time or timeframe. 

 
Sie Samuel Roland Youl:

Hi, does anyone know how to get the candle close from a non time based custom chart such as renko ? iClose and Copyclose doesn't work.

thanks.

You have to modify the renko code where a brick is completed you have to return close then you will be able to get info from it. If there is custom symbol then Copyclose work only if there is candlesticks or tick, it does not work when there is renko as you said because iCLose documentation mentions about BAR and RENKO is a brick ( not a bar)

 

If I well get your point, I should convert Brick to Bar? 

Or i should return close as a  variable? 

 
Sie Samuel Roland Youl #:

I understand what you mean, I think i didn't well explained my issue. 

Supposed I generate a renko chart on M1, when I use iClose, they value I get is based on time instead of renko candle close. I have some function that should be executed one the tradable chart after a renko Candle close 

We all know renko is based on price and it can take up to 1 hour or more to generate a new candle.  But in my case, if I'm on M1, I noticed that the iClose only record the last price as closing price after every minute. The same way if I'm on M5 only the last price after each 5 minutes is recorded as closing price. 

I wonder if it is because the the iClose require a time frame in his statement. 

That is why I'm asking if there is a function that can get the candle closing time without taking into account the time or timeframe. 

If the Renko custom symbol is generated then you should always reference the M1 time frame and no other.

And if the current symbol is not the Renko Generated one, then reference the symbol name directly

 
Sie Samuel Roland Youl #:

If I well get your point, I should convert Brick to Bar? 

Or i should return close as a  variable? 

Brick is not required to be converted into a bar.

Brick is timeless while bar has time.

In one tick, there can be hundreds of renko bars so you have to return close of last bar when a brick gets closed

 
I see, thanks for your help 
 
Fernando Carreiro #:

If the Renko custom symbol is generated then you should always reference the M1 time frame and no other.

And if the current symbol is not the Renko Generated one, then reference the symbol name directly

Oh, I understand, thanks a lot for your guidance.