75,000 options - 4GB RAM and 4GB disk cache not enough??? - page 5

 
We don't have a visualisation, we haven't needed one yet.
But we will probably do it in the next version.

I will show you what I can.
It is impossible to transfer the Expert Advisor 100%,
I'll make an approximation, it's not about the Expert Advisor, is it?
It's about the optimizer's capabilities, isn't it?
 
Mak:
We don't have a visualisation, we haven't needed one yet.
But we will probably do it in the next version.

I will show you what I can.
It is impossible to transfer the Expert Advisor 100%,
I'll make an approximation, it's not about the Expert Advisor, it's about the optimizer's capabilities,
It's about the optimizer's capabilities, isn't it?
Not at all. The whole complex of mapping and usability is the essence of it, which entails a big expenditure of resources.

It is one thing to make programmers plough all their code to embed communication with an external optimizer, and then to run the optimizer that calculates something there. And all this at a cost. And it is another matter to check the "Genetic optimization" option from any expert, select a normal range (not tens of billions), get the results and immediately look through the results while the optimizer works, without any additional programs. And it's free.

We consistently make our systems as simple, convenient and integral as possible. Someone claims "my tester is 10-100 times faster", but does not prove it. Somebody talks about fictitious tasks with "a horse in a spherical vacuum". While we make working systems that work massively for hundreds of thousands of traders using MetaTrader. And we are far ahead of any competitors, also because of our ideology of building systems.

ps: By the way, why the distribution package of your genetic optimizer is larger than that of MetaTrader? Is it not economical to write it?
 
Well, here's a run.

I don't have currencies in Omega, I ran on what is in the distribution
- IBM (D1) for 31 years (> 11 thousand bars).

1000 runs took ~10 min on Athlon XP 1500+

I widened parameters ranges, because volatility is higher on stocks

TakeProfit = (10, 10000, 1)
TralingStop = (10, 10000, 1)
Lots = (1, 1000, 1) - my number of stocks is
MACDOpenLevel = (1, 100, 1)
MACDCloseLevel = (1, 100, 1)
MATrendPeriod = (2, 100, 1)

Total parameter space is ~ 10^14 states.

Below is the code in EasyLanguage and ScreenShot.
Also attached signal code and reports from Omega in Zip file.

(pasting code didn't work)
========================================================================
Inputs: Gen(1);
Vars: TakeProfit(50),
TralingStop(30),
Lots(0.1),
MACDOpenLevel(3),
MACDCloseLevel(2),
MATrendPeriod(26);

Vars: R(0),K(0);
If CurrentBar = 1 Then Begin
R = TS.GO.Start("MACD");
If Gen = 1 Then Begin
R = TS.GO.Mode(0);
R = TS.GO.Popul(100);
R = TS.GO.Var("Gen");
R = TS.GO.Var("Trades");

R = TS.GO.Method(1);
R = TS.GO.Criterion("NetProfit",1);
R = TS.GO.Criterion("MaxDD",1);
R = TS.GO.Criterion("PF",1);

K = TS.GO.Chrom("Stops");
R = TS.GO.Gen("TakeProfit", K, 10, 10000, 1);
R = TS.GO.Gen("TralingStop", K, 10, 10000, 1);

K = TS.GO.Chrom("Lots");
R = TS.GO.Gen("Lots", K, 1, 1000, 1);

K = TS.GO.Chrom("MACD");
R = TS.GO.Gen("MACDOpenLevel", K, 1, 100, 1);
R = TS.GO.Gen("MACDCloseLevel", K, 1, 100, 1);
R = TS.GO.Gen("MATrendPeriod", K, 2, 100, 1);
End;

R = TS.GO.Next(Gen);
R = TS.GO.Set("Gen",Gen);
R = TS.GO.ShowViewer;

TakeProfit = TS.GO.Get("TakeProfit", 0);
TralingStop = TS.GO.Get("TralingStop", 0);
Lots = TS.GO. Get("Lots", 0);
MACDOpenLevel = TS.GO.Get("MACDOpenLevel",0);
MACDCloseLevel = TS.GO.Get("MACDCloseLevel",0);
MATrendPeriod = TS.GO.Get("MATrendPeriod",0);
End;

Vars: MacdCurrent(0), MacdPrevious(0), SignalCurrent(0),
SignalPrevious(0), MaCurrent(0), MaPrevious(0);

MacdCurrent = MACD(Close,12,26);
MacdPrevious = MACD(Close,12,26)[1];
SignalCurrent = XAverage(MacdCurrent,9);
SignalPrevious = XAverage(MacdCurrent,9)[1];
MaCurrent = XAverage(Close,MATrendPeriod);
MaPrevious = XAverage(Close,MATrendPeriod)[1];

Vars: StopLoss(0);
If MarketPosition = 0 Then Begin
If MacdCurrent < 0
and MacdCurrent > SignalCurrent
and MacdPrevious < SignalPrevious
and AbsValue(MacdCurrent) > (MACDOpenLevel Point)
and MaCurrent > MaPrevious
Then Begin
Buy Lots shares this bar on close;
end;

If MacdCurrent > 0
and MacdCurrent < SignalCurrent
and MacdPrevious > SignalPrevious
and AbsValue(MacdCurrent) > (MACDOpenLevel Point)
and MaCurrent < MaPrevious
Then Begin
Sell Lots shares this bar on close;
end;
end;

If MarketPosition > 0 Then Begin
If MacdCurrent > 0
and MacdCurrent < SignalCurrent
and MacdPrevious > SignalPrevious
and AbsValue(MacdCurrent) > (MACDCloseLevel Point)
Then Begin
ExitLong ("CloseLong") this bar on close;
end;

If StopLoss = 0 Then StopLoss = EntryPrice - TralingStop Points;
StopLoss = MaxList(StopLoss,High - TralingStop Points);

ExitLong ("TakeLong") Next Bar at EntryPrice + TakeProfit Points Limit;
ExitLong ("StopLong") Next Bar at StopLoss Stop;
end;

If MarketPosition < 0 Then Begin
If MacdCurrent < 0
and MacdCurrent > SignalCurrent
and MacdPrevious < SignalPrevious
and AbsValue(MacdCurrent) > (MACDCloseLevel Point)
Then Begin
ExitShort ("CloseShort") this bar on close;
end;

If StopLoss = 0 Then StopLoss = EntryPrice + TralingStop Points;
StopLoss = MinList(StopLoss,Low + TralingStop Points);

ExitLong ("TakeShort") Next Bar at EntryPrice - TakeProfit Points Limit;
ExitLong ("StopShort") Next Bar at StopLoss Stop;
end;


IF LastBarOnChart Then Begin
R = TS.GO.Set("Trades",TotalTrades);
R = TS.GO.Set("NetProfit",NetProfit);
R = TS.GO.Set("MaxDD",MaxIDDrawDown);
R = TS.GO.Set("PF",GrossProfit/(0.001-GrossLoss));
R = TS.GO.Fitness(0);
End;
========================================================================


Files:
macd_test.zip  32 kb
 
Renat:
Mak:
We don't have a visualisation, we haven't needed one yet.
But we will probably do it in the next version.

I will show you what I can.
It is impossible to transfer the Expert Advisor 100%,
I will make something approximate, it's not about the Expert Advisor, it's about the optimizer's capabilities?
It's about the optimizer's capabilities, isn't it?
Absolutely not. The point is in the whole complex of mapping and usability, which entails a great expenditure of resources.

It's one thing to make programmers plough all their code to integrate communication with an external optimizer, and then to run the optimizer that calculates something there. And all this at a cost. And it is another matter to check the "Genetic optimization" checkbox of any expert, select a normal range (not tens of billions), get the results and immediately look through the results while optimizer works, without any additional programs. And it's free.

We consistently make our systems as simple, convenient and integral as possible. Someone claims "my tester is 10-100 times faster", but does not prove it. Somebody talks about fictitious tasks with "a horse in a spherical vacuum". While we make working systems that work massively for hundreds of thousands of traders using MetaTrader. And we are far ahead of any competitors, also because of our ideology of building systems.

ps: By the way, why the distribution package of your genetic optimizer is larger than that of MetaTrader? Is it not economical to write it?

Renat, you yourself REQUIRED me to show you this.
I have repeatedly asked you what THIS is ....
If you had written a previous post when I asked you about it,
the conversation would have gone differently, and I wouldn't have needed to rewrite this MACD for Omega.
I had to put aside other things to get busy proving "I'm not a camel".

Bottom line.
You say what a good thing you did and for free ...
Was I arguing with you about that (I wasn't arguing with you about anything at all)?

I just pointed out that your optimizer consumes too much memory.
I think this is a legacy from an old version of your optimizer, when you didn't have CS yet.
This is easy to fix and will make your optimizer even better.

Note, no criticism on my part.
I just wanted to help you.
 
It's quite different when you defend your position with detail. Really, why are there only 1,000 overshoots in such a large space? That's a very crude way to look at it. I ran this EA in MT4 over 1.5 B of values and it resulted in 4400 net rebounds within 4 minutes on 18000 bars of EURUSD H1 history.

This task is of course the realm of the spherical horse in a vacuum and we in MT4 are in fact incorrectly trying to reserve a certain amount of memory due to the huge area of possible values (the legacy of the brute force attack mechanisms). This point will be corrected.

Thank you for your persistence - you have forced us to dig deeper into the tester.
 
Renat писал (а):

.... But why are there only 1000 rebounds in such a large space? It's very crude. I ran this Expert Advisor in MT4 over an area of 1.5 billion values and got 4400 net overshoots in 4 minutes on 18000 bars of EURUSD H1 history. ....
The search speed in genetics is independent of the size of parameter space.
It depends on the quality of the target function (fitness).

Besides, we use the original algorithm which is an order of magnitude faster than other algorithms we know.
1000 runs is a bit much, I usually use 100-200 runs (for any number of parameters) to evaluate a solution.
 
Renat писал (а):
Yes, in fact this EA in the test consumes too much memory and goes down. We'll look into it.
Thanks for the code provided.


Renat, no news yet?
 

sane, there's news. They found a memory leak. The compiler didn't insert the line release command in the right place.

 
stringo писал (а):

sane, there's news. They found a memory leak. The compiler didn't insert the line release command in the right place.


ok, we're waiting for the new build.
 
sane:
stringo:

sane, there's news. They found a memory leak. The compiler didn't insert the line release command in the right place.


ok, waiting for the new build.

I've run your example on the new build of 198 EA:







No more excessive memory consumption, with genetic optimization enabled there were 1088 searches out of 21600 and the calculation took 8 minutes and 31 seconds.

About the Expert Advisor itself - it should by no means be used because of serious errors:
  • Incorrect stop levels and all logs are littered with messages about it
  • for the SetOrder function you can get a severe ban on trading with Expert Advisors from your broker

    This function tries to trade at outdated prices five times, the author of the Expert Advisor does not understand what it is doing (it tries to use RefreshRates, but still gives an outdated price). And there is no meaningful error handling at all.