well - google and you'll find a lot!!
This moght depend on the new version - open them in the mt4 editor and try to compile them and eliminate the problems.
Or google more.
Hi, can anyone share with me a working source code to build CONSTANT RANGE BAR charts ? Pseudocode is also accepted, i have no clue how to do it, and I cant find any tutorial on the internet which would explain how CRB charts are constructed.
I dont want RENKO CHART, there is a difference, I want CRB chart. So can anyone help me please?
- My classes attached
#include "crb.mqh" cCRB gCRB; void ChartUpdated(const cChart& aCrt, bool isFinal=false){ : // Update other things depending on CRB } int OnCalculate (...){ int counted_bars = IndicatorCounted(); if(counted_bars < 0) return (-1); if(counted_bars == 0){ gCRB.Initialize(CRB_Pips); // History refresh // or parameter change. counted_bars = 1; } // Color Lookback for(int iBeg = Bars - 1 - counted_bars; iBeg >= 0; --iBeg){ gCRB.Update(iBeg); ChartUpdated(gCRB); // Update SMI with CRB's current close. :
- Renko, Point and Figure, Constant Range Bars are all the same, price based chart. They vary by how they start a new bar.
- Renko: New open in the current direction is one block from the current open. In the opposite direction, two blocks.
- Point and Figure: No new in the current direction. In the opposite direction, three blocks back from the highest completed block.
- Constant range bars: New when price exceeds current low plus block size or current high minus block size.
- Renko: New open in the current direction is one block from the current open. In the opposite direction, two blocks.
- My classes attached
- Renko, Point and Figure, Constant Range Bars are all the same, price based chart. They vary by how they start a new bar.
- Renko: New open in the current direction is one block from the current open. In the opposite direction, two blocks.
- Point and Figure: No new in the current direction. In the opposite direction, three blocks back from the highest completed block.
- Constant range bars: New when price exceeds current low plus block size or current high minus block size.
- Renko: New open in the current direction is one block from the current open. In the opposite direction, two blocks.
Ok that is a good explanation thanks, so 1 more question.
In the CRB chart, what values do the OPEN,HIGH,LOW,CLOSE get, and how are they calculated. I see that the HIGH-LOW is always the size of the range, but the close may vary so please explain.
H/L/C change as price moves up or down just like time based chart.
When C tries to exceed the range, a new bar starts and previous bar's C equals H or L.
Open is equal to the previous bars close (+1 point in my code.)
H/L/C change as price moves up or down just like time based chart.
When C tries to exceed the range, a new bar starts and previous bar's C equals H or L.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, can anyone share with me a working source code to build CONSTANT RANGE BAR charts ? Pseudocode is also accepted, i have no clue how to do it, and I cant find any tutorial on the internet which would explain how CRB charts are constructed.
I dont want RENKO CHART, there is a difference, I want CRB chart. So can anyone help me please?