Quote:
Originally Posted by Sadly
Do you have the original to hand?
When I applied the indicator to a chart, MT4 locked up and left me with an egg timer for company.
|
Look on page 2 of this thread. Piperoni posted it. I just added the display. Wonder if the original worked in the first place?
I think I found the problem:
Code:
extern int MaxPeriod = 960;
.
.
.
if (Bars < MaxPeriod) return(0);
//----
for (int i = 0; i < MaxPeriod; i++)
It's running 960 times for each pair!!
So I modified it to:
Code:
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
if (limit > MaxPeriod) {limit= MaxPeriod ;} // TRO
I am NOT the ORIGINAL author and I am not claiming authorship of this indicator. All I did was modify it. I hope you find my modifications useful.
I updated the code in my post above.
I am NOT the ORIGINAL author and I am not claiming authorship of this indicator. All I did was modify it. I hope you find my modifications useful.