Renko Time

To add comments, please log in or register
Alberto Tortella
793
Alberto Tortella  

Hi all, I would like to create an histogram indicator to track the time for every Renko brick.

I wrote this but I seem it doesn't work well, could you help me? Thank you!

int start()
  {
   int limit;
   int counted_bars=IndicatorCounted();
   
//---- last counted bar will be recounted
 
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   
//---- calcolo entry_long 
   for(int i=1; i<limit; i++)
      Histogram[i] = Time[i] - Time[i+1] ;
 
   Histogram[0] = TimeCurrent() - Time[0] ;
    return(0);
//---- done
   
  }
appropiate
1673
appropiate  
I think  this indi does just that
Files:
Alberto Tortella
793
Alberto Tortella  

Thank you very much!

Could you explain the Threshold ?

William Roeder
18934
William Roeder  
  1. Alberto Tortella: but I seem it doesn't work well,

    "Work well" or "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here and our crystal balls are cracked.

  2. Alberto Tortella: Could you explain the Threshold ?
    It draws a histogram if that bar's duration is at least that many minutes.
Alberto Tortella
793
Alberto Tortella  
William Roeder:
  1. "Work well" or "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here and our crystal balls are cracked.

  2. It draws a histogram if that bar's duration is at least that many minutes.
1. I don't understand why you waste time with these rude answers. If you don't want to look at the code, it's enough that you don't answer, don't you think?


2. No, Threshold is to avoid to obtain too big histogram. The bars are drawn anyway.

appropiate
1673
appropiate  
Alberto Tortella:

Thank you very much!

Could you explain the Threshold ?

I am no coder, but threshold seems to be the maximum value in minutes that a renko bar can have in the histogram even if that renko bar lasts longer than the specified threshold. So if threshold is 1000, then renko bars that lasts longer than 1000 min will have value of 1000 in the histogram.

William Roeder
18934
William Roeder  
Alberto Tortella:
1. I don't understand why you waste time with these rude 
answers. If you don't want to look at the code, it's enough that you 
don't answer, don't you think?

2. No, Threshold is to avoid to obtain too big histogram. The bars are drawn anyway.

  1. You wrote "doesn't work well." How should we answer that? You couldn't even write a meaningful question. You waste everyone's time (not one person but possibly hundreds have looked at your post,) with your nonsense - how rude.
  2. My mistake, less than vs greater than. The coffee hadn't yet kicked in. But why did you ask "Could you explain the Threshold ?" when now you know the answer? You waste everyone's time, with an question you could have answered yourself and did - how rude.
To add comments, please log in or register