Stochastic indicator. A curious observation. - page 8

 
leonid553:

Hello all. Here is another interesting observation. The Expert Advisor based on the tactics shown in the picture in the previous message seems to be able to work profitably. However, I have modified its operation by making long and short positions independent of each other. I.e. I have obtained two versions united in one Expert Advisor. In accordance with the idea described in https://www.mql5.com/ru/articles/1485

One version is BUY only, the other is SELL only.

GBPJPY, M30, C 1 Jan. 2007 to Seg.

Note the drawdown in united mode.

Can you post the code? I want to run it.
 

I'd like to share my simplest version of the ST+ENV system with you later. Without trend filters, etc... no trend filters and other "excesses"... Long and short trades operate independently. You can disable them using the corresponding options Long =true/false; Short =true/false; your Expert Advisor works by Opening prices. Optimize long and short versions separately. Parameters Stochastic_period ; MA_period ; Deviation ; optimize in the range from 4 to 28 units. Other parameters (stops and trawl) depend on the timeframe and common sense. I usually optimize on the history of 1.5 years and more. Especially on small (m30) timeframes.

The source code is in the download

Files:
st_env_.mq4  7 kb
 
Leonid, could you post the Stohostic Enveloper indicator
 

You can. In the download. But in folder include you should add B-lots calculation libraries, and I.Kim's trailing stop a-SimpleTrailing. They are in CODE BASE.

The version works for ALL TYCES

Files:
 

Hi.

Couldn't figure it out, here is the test report with stochastic, you can see the obvious long positions bias


and here's the report without the stochastic



I formalize the stochastic crossing as follows:

double S = iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_SMA,0,MODE_SIGNAL,1);
double M = iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_SMA,0,MODE_MAIN,1);
double M2 = iStochastic(NULL,0,KPeriod,DPeriod,Slowing,MODE_SMA,0,MODE_MAIN,2);

S>70 && M>70 && M2>S && M<S //Sell
S<30 && M<30 && M2<S && M>S //Buy
What is my mistake?
 

It seems fine. Except that one of these conditions is probably redundant -

S>70 && M>70 .

And try to remove both of them, these conditions (not to confuse them) - both for buy and for sell. How will buy and sell deals quantitatively correlate then?

 
I don't think there's any error! (not in the code, in the code - I'm 0) How many EAs I've run, through a tester, using stochastic... I don't remember exactly, but a lot... It very much depends on the timeframe in which the EA is tested. If it is in buy trend, there will be more buy orders!
 
Paha:
I think there is no error! (Not in code, in code - I am 0) I have run so many Expert Advisors through the tester using stochastic... I don't remember exactly, but many... It very much depends on the timeframe in which the EA is tested. If it is a buy trend, there will be more buy orders!

Hi.

Just fewer buy trades, but they are much more profitable, and the trend in 2007 for this pair was both here and there.


Idon't know:

I think it's fine. Except that one of these conditions is probably redundant -

S>70 && M>70 .

And try to remove both of them, these conditions (not to confuse them) - for buying and for selling. How do buy and sell deals quantitatively correlate then?

Thanks, I will try it)

 

You know, men... There is a noosphere after all. :)

 

I've been thinking for a week!

And "which one is it, the noosphere?" What's that got to do with it?