How to optimise an advisor correctly - page 7

 
Loring писал (а) >>

I don't understand why the opening of the position was put in a separate function. One command can be executed locally... Or it's a scrap of something bigger... ТР and SL are transmitted not in that sequence in which they are in OrderSend... Thank goodness they are received as they are transmitted. Certainly not a big deal, but ....

Functions are easier to check and put in a separate library. Then we can use the same code in different EAs without getting especially bogged down. The code of the Expert Advisor becomes simpler. All we have left is the functionality.

 
Look at EAs with everything crammed into one start function. They take a long time to sort out.
 
Yes, I agree... The modular structure has a lot of flexibility, especially if there is a sufficient library of standard tricks and functions...
 
Loring писал (а) >>
Yes, I agree... The modular structure has a lot of flexibility, especially if a sufficient library of standard techniques and functions is built up...

100%. I've been doing it that way for a long time now. Very convenient.

 
meta-trader2007 писал (а) >>

The way of optimization depends on the TS underlying the Expert Advisor.

For a trading system, offering to open and close positions by the signals of indicators, I do as follows:

1. optimize the indicator parameters. It is done without using TR, SL, trawl, etc. Using the same lot size. Thus I select the best indicator parameters.



Let's analyze them point by point:

[1] - how it is done without TP & SL.......

Sorry, I'm sorry, ...... everything else is clear and does not need any explanation.

But what about the first point - a question? )

PS Van Tarp, has basically already said and proved everything, there is no reason not to believe him, that MM is worth applying when the system on a constant lot makes some profit.... i dont understand why this question keeps coming up again and again.

I have an Expert Advisor that raises a lot depending on the state of the aggregate position in the direction ( buy or sell ), but I don't consider it MM, because it is nothing more than flexible management of open positions or ways of bringing them to Breakeven..... however the initial lot 0.1 is the principle when testing.... and it should be strictly followed especially in publications.....

 
a bit of a distraction to the subject....
genetic algorithm gives different results with solid optimization.
And what is particularly annoying: the genetic algorithm as an artificial intelligence has already rejected a number of my TCs, supposedly all at a disadvantage.
But with continuous optimization without intelligence there was a profit.
-I will have to re-check the margins/stocks.
 
Vinin писал (а) >>

Functions are easier to check and put in a separate library. Then you can use the same code in different EAs without getting especially bogged down. The code of the Expert Advisor becomes easier. All we have left is the functionality.

Maybe, it is simpler, but personally, I don't like having a lot of files scattered around the entire terminal. That is a matter of taste, of course. :)

It's easier for me to multiply "void" functions in one module (of course - but exactly by my standard))) and not to bother about correct transferring/receiving variables/values, anyway, but every time I "stupidly" (????) have to change their code a bit, but in this case my start function code rarely exceeds 50-60 lines and I don't have to think about transferring variables. It's a bit more global in modulo, but it doesn't affect performance at all..... IMHO

 
Korey писал (а) >>
a little bit off topic....
thegenetic algorithm gives different results with continuous optimisation.
And what is particularly annoying: the genetic algorithm as an artificial intelligence has already rejected a number of my TCs, supposedly all at a disadvantage.
But with continuous optimization without intelligence there was a profit.
-I will have to re-check the margins/stocks.

I was too lazy to check it, but I've never noticed anything like that, maybe because I tried to keep the optimization by number of variants under 10496*5.....

>> "5" is my bug, the fewer parameters are optimized, the better ))..... it seems to me

PS. It just so happens to be more :(

 
the artificial intelligence has not found anything on two parameters, but the solid - profit.
As for the number of optimisable= parameters I am of the same opinion from 1 to 3, and if you need more - the idea of TC is ill-conceived, poor quality.
 
Korey писал (а) >>

about the number of optimisable= parameters and I am of the same opinion from 1 to 3, and if you need more - TC's idea is ill-conceived, inadequate.

I don't know, I don't know...... when you start to calculate EXIT options, there are so many options that you won't see enough - limited only by the experience of previous passes, or to divide by several experts...... I have now an optimized expert - 26400195 options, of them 1/100 of entry options..... I know that after 1-2 passes I will reduce this number by 100 times, but still a lot...... so about "quality" the big question - considered / similar parameters, not distorting logic have a place.....

I realise I'm saying contradictory things, but it's true nonetheless. Even with a strongly powerful resource, you can't escape genetics - you have to adapt ))

Reason: