EA N7S_AO_772012 - page 30

 
SHOOTER777 >> :

А

unfortunately, this observation is unfortunate...also noticed...

 

SHOOTER could you tell us briefly what exactly the parameter groups optimise

  • x
  • y
  • z
  • X
  • Y
  • Z
I probably understand some of it, but I can't get the whole picture in my head yet.
 

Here is another oddity, or maybe just a glitch

double BTS() {
	if (( prcptrnz1() > 0 || F==0) && bu< HM_Up_X) {
		if ( prcptx1 > 0 && Delta_G12>0) {
			sl = slx; 
			tp = tpx * slx; 
			mn = mnx1; 
			return (1);
		}
	} 
	if (( prcptrnz1() < 0 || F==0) && sll< HM_Dn_Y) {
		if ( prcpty1 > 0 && Delta_G12<0) {
			sl = sly; 
			tp = tpy * sly; 
			mn = mny1;
			return (-1);
		}
	}
	return (0);
}

It turns out that if now F == 0 and there are no open positions at all - then we can get into the first block first, and then into the second one, which will subsequently lead to incorrect results.

Or am I missing something?

 

Probably not, though. We can't get into both blocks at the same time because they won't let us in.

Delta_G12

won't let us in.

 
ShestkoFF писал(а) >>

I don't like to criticise things that work. I'll just give you some criticism of the code:

Spsb. I don't take criticism as criticism, but as a guide to action, i.e. to read at least a little bit of the MQL handbook

  • Idon't want to write everything in lines, because it is impossible to read the code.

Accepted, but probably in future works. I got this "handwriting" after some other, more global projects and due to shallow resolution of my 12 inch monitor. Your version looks undoubtedly better, but I'd have to constantly scroll backwards and forwards through the listing. But since I'm not here for myself, I'll say it again - I'll keep it in mind.

  • Naming variables in a meaningful way

See above! Although I like my names, you just have to get used to them, like we got used to abbreviations GOELRO, OBHSS, IMHO etc. If you look closely, I gave some variables more or less meaningful names, but abbreviated all the vowels.

  • Do not make variables global if they are local.

I haven't got a handle on variables yet. When you are writing code from scratch you have no idea where a variable will be, so almost everything is global.

  • It makes no sense not to make global variables static. If this is not the case, please explain.

empirically it is not so, I will remember where I came across it - I think it was in the function BuSll ()

  • Use standard constants defined in the language. For instance, specification of a time interval. double iA_C (int pr){int tmfr=60; return(iAO(Symbol(), tmfr, pr));} I think it is better to replace it with double iA_C (int pr){return(iAO(Symbol(), PERIOD_H1, pr));}.

I agree, let's correct it, again, when you write a block from zero you have no idea yet what parameters you are going to pass into the function, and then the eye gets "dirty" and you pay no attention to such "trifles" ))

 
ShestkoFF писал(а) >>

SHOOTER could you tell us briefly what exactly the parameter groups optimise

  • x
  • y
  • z
  • X
  • Y
  • Z
I probably partly understand, but I can't get the whole picture in my head yet.

The main driving and guiding force of the Expert Advisor is the notorious)) function G12(). It is this function where preferred trade directions are calculated based on indicators. But one direction is not enough - we need entry points. In "classics", if on one timeframe either patterrons are searched, or the indicator itself is matched if there are external parameters, if there are two or more, they are optimized as well. I have tried yet another new for me method NN

Here this function

double prcptrnAC(int q1,int q2,int q3,int q4,int pr,int at)

{double qw = (q1-50)+((q2-50)*iA_C(pr)+(q3-50)*iA_C(2*pr)+(q4-50)*iA_C(3*pr))/iA_C(1);

if (MathAbs(qw)>at) return(qw);else return(0);}

sort of called a perceptron and designed to get.... something. Here here in detail is some answers to many questions, and better than I would have answered. 'How to find a profitable trading strategy' and Neural Net Recipes. Admittedly I myself read it all diagonally and got more interesting by studying the work of others see below.

This EA is "created based on" MTS "Neural network + MACD" by Batohov, MTS "Сombo", "Combo_Right" & AI by Reshetov, PROphet by PraVedNiK,RSI_Test by zerkmax, auto_optimization.mqh by Igor Malcev and some others.

 
ShestkoFF писал(а) >>

Here is another oddity, or maybe just a glitch

It turns out that if now F == 0 and there are no open positions at all - then we can get into the first block first, and then into the second one, which will subsequently lead to incorrect results.

Or maybe I do not understand something?

F == 0 only in the first two optimization stages, when in addition to Delta_G12 there are Trd_Up_X and Trd_Dn_Y.

If all six steps are passed properly and optimization set-files are used sequentially, then F should always be equal to 1.

And I found my other error when reviewing the code. I see that latest versions work worse. This error appeared in versions 7 and 9.

Has anyone noticed?

 
SHOOTER777 >> :

Here this function

double prcptrnAC(int q1,int q2,int q3,int q4,int pr,int at)

{double qw = (q1-50)+((q2-50)*iA_C(pr)+(q3-50)*iA_C(2*pr)+(q4-50)*iA_C(3*pr))/iA_C(1);

if (MathAbs(qw)>at) return(qw);else return(0);}

sort of called perceptron and intended to get.... something.

This is a bit of a mystery to me at the moment. Of course, I understand what it does and what it's for. But the formula itself is somewhat unusual.
The result of neuron's work should be a number summing up the inputs of neurons multiplied by the weights of these inputs.
I.e. logically it should be something like the following:

double qw = (q1-50) * iA_C(1) + (q2-50) * iA_C(pr) + (q3-50) * iA_C(2 * pr) + (q4-50) * iA_C(3 * pr)

Clearly both are some function of 4 variables (or is it 8?) involved in finding the maximum (resulting balance), but it's still weird :)

 
ShestkoFF писал(а) >>

This function is still a mystery to me. Of course, I understand what it does and why it does that. But the formula itself is somewhat unusual.
The result of neuron's work should be a number summing up the inputs of neurons multiplied by the weights of these inputs.
So, logically it should be something like this:

double qw = (q1-50) * iA_C(1) + (q2-50) * iA_C(pr) + (q3-50) * iA_C(2 * pr) + (q4-50) * iA_C(3 * pr)

Clearly both are some function of 4 variables (or is it 8?) that is involved in finding the maximum (resultant balance), but it's still weird :)

You gave a simplified version of the function, at least that's how I understand it

This is where it's discussed

'MTS 'Sombo'.

' To be fair, it's not a neural network in its purest form. Firstly, it lacks a threshold value without it the dividing ability of the NS is much smaller. Secondly, IMHO, it is worth adding an output activation threshold. What does it mean? To return the signal to trade only if the activation threshold is exceeded. For example:

double res = (w1 * a1 + w2 * a2 + w3 * a3 + w4 * a4 // )/Close[0] - T); // Divide by Close[0] for unification
if (MathAbs(res) > ActivityThreshold) return(res); // ActivityThreshold -- activation threshold

 
gorby777 писал(а) >>

Earlier versions used Close(0) in the perceptron formula z1, but in 7 and 9 Close(1). Is this what we're talking about?

No, I don't think it's about that, after all there is a rule to work on formed bars.

But the fact that the flag Flq=false; one for buy and one for sell strongly influences the division of these directions of trading and therefore the results.

Reason: