Article: Synthetic Bars - A New Dimension to Displaying Graphical Information on Prices

 

New article Synthetic Bars - A New Dimension to Displaying Graphical Information on Prices is published:

The main drawback of traditional methods for displaying price information using bars and Japanese candlesticks is that they are bound to the time period. It was perhaps optimal at the time when these methods were created but today when the market movements are sometimes too rapid, prices displayed in a chart in this way do not contribute to a prompt response to the new movement. The proposed price chart display method does not have this drawback and provides a quite familiar layout.

Author: Rustem Bigeev

 
  1. Your Synthetic Bars are called Constant Range Bars as mentioned in Renko Charts - MQL4 Code Base on 01.04.2008
  2.    if(Volume[0]==1) 
    is unsafe, you can miss ticks. Always use time
    if (Time0 != Time[0]){ Time0 = Time[0]; ...
  3. Since you processed all bars through bar one in init() why are you reprocessing it in start()?
  4. Also, your processing, does not recover from disconnections.
    int indicator_counted;
    int init(){ indicator_counted = 0; }
    int start(){
        if (indicator_counted >= Bars)  indicator_counted = 0;    // https://forum.mql4.com/46987#611724 max bars
        if (indicator_counted == 0) // reset file
        for(int iBar = Bars - 1 - indicator_counted; iBar >= 0; iBar--) processbar(iBar);
        indicator_counted = Bars;
    :
    

 
WHRoeder:
  1. Your Synthetic Bars are called Constant Range Bars as mentioned in Renko Charts - MQL4 Code Base on 01.04.2008
  2. is unsafe, you can miss ticks. Always use time
  3. Since you processed all bars through bar one in init() why are you reprocessing it in start()?
  4. Also, your processing, does not recover from disconnections.



I've noticed that using range bars affects indicators, some positively, e.g. moving averages appear to follow price better. But some indicators are negatively affected. ATR, for example, becomes meaningless since all bars are the same height, but also indicators that use ATR are affected.


@WHRoeder: Could you comment please on using Symbol() and Period() in an EA on an offline range chart? The Period() function won't be that useful, I feel, because the number of minutes between bars will vary. At the moment I am trying to write an EA and test in StrategyTester. I've loaded range data into a standard MQ charts using history centre and SrategyTester is using real tick data (http://eareview.net/tick-data)

 
HarriMQL4:

I've noticed that using range bars affects indicators, some positively, e.g. moving averages appear to follow price better. But some indicators are negatively affected. ATR, for example, becomes meaningless since all bars are the same height, but also indicators that use ATR are affected.

@WHRoeder: Could you comment please on using Symbol() and Period() in an EA
  1. CRB and Renko charts make more bars as price moves so averages update more frequently. Since they have constant size, ATR is constant, but remember you can call the indicators with any symbol/TF combination (iMA()/iCustom()) not just the current chart.
  2. Period() is useless on the generated chart, but why do you care. What you using it for? Symbol could be anything, but is probably the same as the source chart. Verify before trying the OrderSend().
 
WHRoeder:
  1. CRB and Renko charts make more bars as price moves so averages update more frequently. Since they have constant size, ATR is constant, but remember you can call the indicators with any symbol/TF combination (iMA()/iCustom()) not just the current chart.
  2. Period() is useless on the generated chart, but why do you care. What you using it for? Symbol could be anything, but is probably the same as the source chart. Verify before trying the OrderSend().

Thank you very much for your response. I seem to remember comments that Period() is useless, but couldn't find the exact post to confirm. As to why I want to use it, I am writing an EA (for StrategyTester, which has real tick data and range bars loaded into its history, both from Dukascopy).

How then do I use iCustom(Symbol(), Period(), "CustomIndName", ....) if Period() is useless?

Reason: