Elite indicators :) - page 152

67

Statistical Arbitrage

This system (indicator) seems to make a lot of sense. I am always worried about getting scammed though. I can not find anything like this on TSD. May I ask the traders with more experience than I have what your opinion is? Is this possible to code as an indicator and not an EA?

151509

San

It should work

I prefer this form (just to be sure - some array functions can return error if the limit is not smaller than or equal to Bars-1)

int start()

{

int counted_bars=IndicatorCounted();

int i,limit;

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

limit = MathMin(Bars-counted_bars,Bars-1);

//

//

//

//

//

for (i=limit; i>=0; i--)

{

...

}

return(0);

}

but your way should work OK as well as far as counted_bars = IndicatorCounted()

regards

Snowski:

Can we tell by looking at this piece of code whether indicator is repainting...and if so, how to fix it?

Thanks, learning my way into coding indies (new to me, I code EAs, seems to be different sport).

for(int i=Bars-counted_bars-1; i>=0; i--)

San.
324

Thanks mladen, will use your 'setup' as template from now on or mod existing indies if they're different. Much appreciated.

FYI, this is the code I have been using, looks similar although I think your code snippet posted above is more elegant:

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start() {

int limit, i, counter;

double Range, AvgRange;

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;

for(i=Bars-counted_bars-1; i>=0; i--) {

counter=i;

Range=0;

AvgRange=0;

//---- loop for height placement of arrows

for (counter=i ;counter<=i+9;counter++){

AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);

}

Range=AvgRange/10;

//---- indicator algo starts here

.....

}

return(0);

}
50

Request to change "GMMA Oscillator" to work like "Schaff Trend Cycle arrows"

Files:
324

Can you post the GMMA Osc as well?

Cheers, San.

50

here you are. Cheers

gmma_oscillator.mq4

Snowski:
Can you post the GMMA Osc as well? Cheers, San.
Files:
151509

clc4x

regards

Files:
50

hurray, thank you very much.

clc4x

2970
Hercs

You made a SchaffTrendCycle indicator with alerts when the indicator changed colour before we had Prof. Twomey's levels available when you kindly changed it to levels 75/25 alerts.

Would you be kind enough and do the same for me on this Stochastic that I attach here for your kind perusal?

The colour change naturally only on the Green/Lime-line and not the MVA.

Much appreciate your time and expertise.

Files:
318

Repainting Indicator

Hi Mladen, sorry for bugging you , can you do me a "big" favor and fix repainting in attached indicator. Many thanks in advance ..

Files:
ma.mq4 6 kb