RBCI + TTF = Profit? - page 2

 
Mendikero:
No way - I use it as it is.

Well, get a flush in the end.
 
jelizavettka:

Well, you'll end up getting drained in the end.
Take a look at the chart (I put it in the first post). These indicators are pretty specific, they don't need much tuning, you can leave them as they are. I removed unnecessary lines from both indicators, leaving only the necessary ones.
 
Mendikero:
Have a look at the graph (included in the first post). These indicators are quite specific, they don't need much customisation, you can leave them as they are. I have removed unnecessary lines from both indicators, leaving only the necessary ones.

Now I will download them and test. What a bastard RBCI is! It eats CPU resources unreasonably. We need to optimize the code.
 
jelizavettka:

I'm going to download them now and test them. This RBCI is an abomination! It eats CPU resources unreasonably. We need to optimize the code.
Yes, it is what it is. My terminal takes a couple of minutes to load with it. But there's nothing to optimize there - the code is six Kilobytes, while the calculations themselves are a couple dozens of lines.
 

A couple of dozens of lines can be so messy that the terminal won't load at all.

Yes, I can't call this code optimal. The line with error is highlighted (noticed by Rosh).

//+------------------------------------------------------------------+ 
//| RBCI.mq4                                                         |
//|                                                                  |
//+------------------------------------------------------------------+ 
#property copyright "Copyright 2002, Finware.ru Ltd."
#property link "http://www.finware.ru/"
//----
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue
//---- buffers 
double RBCIBuffer[];
//+------------------------------------------------------------------+ 
//| Custom indicator initialization function                         | 
//+------------------------------------------------------------------+ 
int init()
  {
   string short_name;
//---- indicator line 
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,RBCIBuffer);
   SetIndexDrawBegin(0,55);
//---- 
   return(0);
  }
//+------------------------------------------------------------------+ 
//| RBCI                                                             | 
//+------------------------------------------------------------------+ 
int start()
  {
   int i,counted_bars=IndicatorCounted();
//---- 
   if(Bars<=55) return(0);
//---- initial zero 
   if(counted_bars<55)
      for(i=1;i<=0;i++) RBCIBuffer[Bars-i]=0.0;
//---- 
   i=Bars-55-1;
   if(counted_bars>=55) i=Bars-counted_bars-1;
   while(i>=0)
     {
      RBCIBuffer[i]=
      -(
      -35.5241819400*Close[i+0]
      -29.3339896500*Close[i+1]
      -18.4277449600*Close[i+2]
      -5.3418475670*Close[i+3]
      +7.0231636950*Close[i+4]
      +16.1762815600*Close[i+5]
      +20.6566210400*Close[i+6]
      +20.3266115800*Close[i+7]
      +16.2702390600*Close[i+8]
      +10.3524012700*Close[i+9]
      +4.5964239920*Close[i+10]
      +0.5817527531*Close[i+11]
      -0.9559211961*Close[i+12]
      -0.2191111431*Close[i+13]
      +1.8617342810*Close[i+14]
      +4.0433304300*Close[i+15]
      +5.2342243280*Close[i+16]
      +4.8510862920*Close[i+17]
      +2.9604408870*Close[i+18]
      +0.1815496232*Close[i+19]
      -2.5919387010*Close[i+20]
      -4.5358834460*Close[i+21]
      -5.1808556950*Close[i+22]
      -4.5422535300*Close[i+23]
      -3.0671459820*Close[i+24]
      -1.4310126580*Close[i+25]
      -0.2740437883*Close[i+26]
      +0.0260722294*Close[i+27]
      -0.5359717954*Close[i+28]
      -1.6274916400*Close[i+29]
      -2.7322958560*Close[i+30]
      -3.3589596820*Close[i+31]
      -3.2216514550*Close[i+32]
      -2.3326257940*Close[i+33]
      -0.9760510577*Close[i+34]
      +0.4132650195*Close[i+35]
      +1.4202166770*Close[i+36]
      +1.7969987350*Close[i+37]
      +1.5412722800*Close[i+38]
      +0.8771442423*Close[i+39]
      +0.1561848839*Close[i+40]
      -0.2797065802*Close[i+41]
      -0.2245901578*Close[i+42]
      +0.3278853523*Close[i+43]
      +1.1887841480*Close[i+44]
      +2.0577410750*Close[i+45]
      +2.6270409820*Close[i+46]
      +2.6973742340*Close[i+47]
      +2.2289941280*Close[i+48]
      +1.3536792430*Close[i+49]
      +0.3089253193*Close[i+50]
      -0.6386689841*Close[i+51]
      -1.2766707670*Close[i+52]
      -1.5136918450*Close[i+53]
      -1.3775160780*Close[i+54]
      -1.6156173970*Close[i+55]);
      i--;
     }
   return(0);
  }
//+------------------------------------------------------------------+
 
Mendikero:
I don't know why r772ra chose the minute chart to illustrate it - I gave an example on the four-hour chart.

The indicator redraws on all charts, try to test it in visualisation mode, and after the pass put the same indicator on the chart, see what happens.
 
Mathemat:

In a couple of dozen lines, you can make such a mess that the terminal won't boot at all.

Yes, I can't call this code optimal. The line with an error is highlighted ( Rosh noticed it).

It's a strange line in general. Is it right?

if(counted_bars<55)
      for(i=0;i<=1;i++) RBCIBuffer[Bars-i]=0.0;

But this fix doesn't make it load faster.

 

crossing lines of different indicators are not fixed, self-defeating

zoom in to full

a little smaller and everything is different

my terminal does not load a bit, but these indicators are useless)

 
r772ra:

The indicator re-draws on all charts, try to test it in visualisation mode, and after the pass, apply the same indicator to the chart, see what happens.
It re-draws on the zero bar, but you should not focus on it. The signal is only the closed bar (I used them to mark entry points on the chart, otherwise they would have been shifted back one candle and the signals would have been even earlier).
 
r772ra: The indicator re-draws on all charts, try to test in visualization mode, and after the passage of the same indicator on the chart, see what happens.

I don't think it should - apart from zero...

Mendikero: It takes me a couple of minutes to load the terminal with it.

jelizavettka : What a nasty thing this RBCI is! It eats CPU resources unreasonably.

I am surprised. I've already prepared for the minute load - but I calculated everything instantly (on the history of charts up to July 2006). You guys both need to change your rocks...