Show 5 minute candlestick in 1 minute chart

Forums ProRealTime English forum ProBuilder support Show 5 minute candlestick in 1 minute chart

Viewing 14 posts - 16 through 29 (of 29 total)
  • #197213

    @Druby thanks for your hint, but so far it works very well. Thanks again to Robertogozzi for his support. You always help me a lot!

    1 user thanked author for this post.
    #197232

    Thanks for comments guy’s.

    Razz if it’s doing what you want, then that’s good. I thought that might be the case, but just couldn’t sit here and no say nothing.

    And Rob your right,  the code is 30sec specific and would need tweaking if used on another chart time frame as you mention. However it now looks like I did a bad job of explaining that bit because that wasn’t the point I was trying to make.

    The problem stems deeper in proBuilder, and how coder’s interpret some of the instruction . To me it seems to be one of those situations where 99.99% of the time it doesn’t cause an issue and if it does, can be so subtle that it goes un-noticed. But it’s always there lurking in the background..

    From my observations it appears that using ‘Barindex’ in ‘drawRectangle’ isn’t a 100%  fit and especially under low market activity, the objects position can be affected.

    There can be a weird relationship between tick’s, candle’s, charts and instructions, i’ll post about it when I get my head around it. Wen’t back through the instruction database and dug up ‘dateToBarindex’ which i’d missed the several thousand times I’ve been through it. This may offer the path to a solution.

     

    1 user thanked author for this post.
    #197264

    I made the code to automatically detect the current (default) TIMEFRAME, which cannot be higher than 15 minutes (unless you change lines 16, 17 and 36 as stated below).

    You can set your preferred TF changing lines 16 and 36. Furthermore you have to change line 17 to set the correct number of seconds in the preferred HIGHER timeframe.

    On your chart you can use any of the allowed default TFs (be it 1, or 15 or 30 seconds, 1 or 3 or 5  minutes). Beware that with a HIGHER timeframe of 15 minutes you can’t use a 2-minute default TF as 15 is not a multiple of 2. The same for a WEEKLY TF, which is considered being made of 7 days (it doesn’t matter if they trading days or not), so you could only use a 1-day default TF, as 7 is a multiple of 1 only.

    3 users thanked author for this post.
    #210502

    Good evening Robert

    I applied his code but the filling does notappear ( the internal bar is transparent ) and neither in the following code ( that of RAZ ) : do I have to add something ?? Thank you

    1 user thanked author for this post.
    #210553

    Good evening Robert

    I applied his code but the filling does notappear ( the internal bar is transparent ) and neither in the following code ( that of RAZ ) : do I have to add something ?? Thank you

    Ok Roberto, I managed it by myself: i have another question, I would like to bring the bar back to 15 minutes ( instead of the 5min one) in the 1 minute graph …..what should I change in the code???

    thank you

    #210588

    The code at https://www.prorealcode.com/topic/show-5-minute-candlestick-in-1-minute-chart/page/2/#post-197264. is written for the 15-minute candle in the 1-minute TF.

     

     

    1 user thanked author for this post.
    #219950

    Is it possible to form custom candle for 4hr timeframe based on time. The PRT 4hr candle is different from MT5 candles as they open 1 hr apart. I understand we cannot change the 4hr candle open time. So is it possible to draw it at 7 am, 11 am, 3 pm, 7 pm and 11 pm, 3 am

     

    thanks in advance

    PJ

    #219953

    You can do that on a 1 -hour TF, by first drawing the current 1-hour candle white so that it’s made invisible, then, every 4 hour you need to draw a rectangle (covering 4 hours).

    The outcome will not be beautiful, but it’s the only way to accomplish that!

    Actually you could leave the original candlesticks, so that they are overlapped (starting at 3am):

    #220869

    thanks. Would it be possible to change the candle colour in 1hour based on time. Say 10pm hourly candle changes to Blue without affecting other candles. Is it something possible?

    #220965

    There you go:

     

    #220986

    Hello,

    I see that the indicator draws a new candle every 15 minutes. And that’s great. But I have a question.

    Would it be possible to add some code to this indicator, so that the new 15-minute candle that is forming at that moment is drawn in real time and not have to wait for the 15 minutes to end?

    Thank you so much!

    #221027

    This indicator is made to draw one candle every 4 hours to simulate a 4-hour TF).

     

     

    #221934

    I made the code to automatically detect the current (default) TIMEFRAME, which cannot be higher than 15 minutes (unless you change lines 16, 17 and 36 as stated below).

    You can set your preferred TF changing lines 16 and 36. Furthermore you have to change line 17 to set the correct number of seconds in the preferred HIGHER timeframe.

    On your chart you can use any of the allowed default TFs (be it 1, or 15 or 30 seconds, 1 or 3 or 5 minutes). Beware that with a HIGHER timeframe of 15 minutes you can’t use a 2-minute default TF as 15 is not a multiple of 2. The same for a WEEKLY TF, which is considered being made of 7 days (it doesn’t matter if they trading days or not), so you could only use a 1-day default TF, as 7 is a multiple of 1 only.

    Hi robertogozzi,
    Very smart to use GetTimeFrame instruction in order to calculate the offset for the begining of the higer timeframe candle, but as you can see in the pictures, there is a problem for last and firt candles of the week if the higher time frame is bigger than 1 hour… If higher time frame is 2 hours or 4 hours for example, last candle of the week and first one will overlap as in reality those candles do not last more than 1 hour. First full candle of 2 hours or 4 hours begin at 01:00…

    #221937

    And here below, the solution i found to this issue :

    On the picture below : 4 hours candles drawn on 5 minutes time frame. Last 4 hours candle of the week and first one are smaller, which is normal from how prorealtime works…

    2 users thanked author for this post.
Viewing 14 posts - 16 through 29 (of 29 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login