
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I don't think he needs the time for each bar. He just needs the bar count (renko bar's) to restart at a pre-given time, each day. The bars after the starting bar would not be time related, only 1 bar each day would be time related.
(note* Though renko can also be based on closing prices and a closing price is time related)
Yes this is exactly what i am looking for.
Does your Renko generator create charts with valid timestamps? Then there's no difference.
As for counting how many bars for the higher time frame, try
I have tried the above code, but it has two problems.
1- the last candle is numeric as 1 and the before last is 2 and so on... Actually i want to count candles so if we count it on normal time frame such as H1 and the last candle is for example on 8 O'clock, the number of candle should be 8 and not 1.
2- This code that you advised me, has not any loop like above pictures. I want to recount candles every day and it should not be related to the past days. For example by your code if on normal H1 chart we have 8 O'clock, it must has the value 8 for current day and for previous day on the same 8 O'clock. but your code gives the value 1 for current candle and 24 for previous day on 8 O'clock.
I hope that you understood what i mean.
Best regards
I have found myself a solution for that problem. If anybody need simething like this can use the below code and it works perfect:
If you want to use the below code on Renko please wipeout 1+ on
So the first candle after Timeframe period starting will be 1.
But remember if you want to use it on normal charts the number of first candle on H1 timeframe after 00:00 O'Clock will be 0 and the number of bar that opens on 1:00 will be 1.
So if you want that Bar on 00:00 O'Clock has the value 1, you will need 1+ on the code like above.