# Simple experts - page 4

106283

borgesr:

It is possible to use Stochastic?

If my questions are messing can open a session only for this.

Regards,

Rogério

Do not open a thread for that

Yes, stochastic can be used and already there are EAs that are using stochastic for trading

934

Any example with Stochastic?

Regards,

Rogério

106283

borgesr:
Any example with Stochastic?

Regards,

Rogério

For start you can check this thread : https://www.mql5.com/en/forum/179114

271

borgesr:
Hi

I used the template provided by MLADEN and tested with Slope.

Opens several orders but sometimes the slope repaint and goes to negative.

Regards,

Rogério

Do you limit the number of orders?

934

I'm testing with the code below.

What are the best values for the Stochastic?

extern int KPeriod=14;

extern int DPeriod=5;

extern int Slowing=5;

bool diStcSell = false;

double diStochasticS1=iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_EMA,PRICE_CLOSE,MODE_MAIN,0); //Sell 1

double diStochasticS2=iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_EMA,PRICE_CLOSE,MODE_SIGNAL,0); //Sell 2

}

if (diStochasticS1<diStochasticS2){ //Sell

diStcSell = true;

}

Regards,

Rogério

106283

borgesr:

I'm testing with the code below.

What are the best values for the Stochastic?

extern int KPeriod=14;

extern int DPeriod=5;

extern int Slowing=5;

bool diStcSell = false;

double diStochasticS1=iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_EMA,PRICE_CLOSE,MODE_MAIN,0); //Sell 1

double diStochasticS2=iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_EMA,PRICE_CLOSE,MODE_SIGNAL,0); //Sell 2

}

if (diStochasticS1<diStochasticS2){ //Sell

diStcSell = true;

}

Regards,

Rogério

Rogério

If there were things like "best settings" then there would be no need for anything of what we are trying to do on any forum dedicated to TA

Try using the expert properties->inputs to set the limits for the parameters that you want to test, and then chose in the optimization tab which criteria it should try to optimize and then let the back test do the optimization. That way you can see the results on some symbols, some time frame and some chosen period for some parameter settings

934

I started a new test with the HMA Color nrp + Stochastic indicator.

I'm testing the automatic magic number + simple Trailing Stop.

If you have a trailing stop better please let us know.

The HMA Color nrp indicator opens more orders than Hull,

Regards,

Rogério

Files:
47

mladen, thanks for starting this new EA section. I have a question about using iCustom. The easy part is the beginning and ending:

iCustom(_Symbol,_Period,"Macd averages tape + lines mtf",............,0,1);

The middle part where you enter the settings (or variables) is a bit confusing. In my example indicator there are lots of "unnecessary" settings. Colors, alerts, and line widths. How do we know which are not needed or actually cause iCustom problems?

106283

donut4popo:
mladen, thanks for starting this new EA section. I have a question about using iCustom. The easy part is the beginning and ending:

iCustom(_Symbol,_Period,"Macd averages tape + lines mtf",............,0,1);

The middle part where you enter the settings (or variables) is a bit confusing. In my example indicator there are lots of "unnecessary" settings. Colors, alerts, and line widths. How do we know which are not needed or actually cause iCustom problems?

The rule is simple : you can omit the parameters from the end of the indicator parameters list, but you can not omit the parameters from the start of the indicator parameters list. That is why I always place alerts and similar stuff at the end of the parameters list in indicators - so that they can be omitted and that only the first few parameters from the beginning of parameters list must be used

934