Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Training not reproducible!? #478370
10/09/19 16:43
10/09/19 16:43
Joined: Jul 2019
Posts: 49
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

Joined: Jul 2019
Posts: 49
Köln
Hi all,

i am investigating my version of Ehlers algo from his "Rocketscience"-Book. When i start the optimization, is comes to a certain solution, but when i start a second opt-run it comes to a totally different solution and so on..... it seems totally random without changing anything. What the hack is wromg here?

function trade_Ehlers()
{
TimeFrame = 2;

vars Price = series(price());
vars Smoothed = series(LowPass(Price,optimize(100,50,200,25)));
vars Trendline = series(HTTrendline(Price));
vars Trendmode = series(HTTrendMode(Price));
var Phase = DominantPhase(Price,10);
vars LeadSine = series(sin(Phase+PI/4));
vars Sine = series(sin(Phase));
MaxLong = MaxShort = 1;

if(abs(Smoothed[0] - Trendline[0]) > (optimize(0.5,0.25,1.5,0.25) * ATR(30))) {
Trendmode[0] = 1;}

Stop = optimize(30,3,21,3) * ATR(30);

if(Trendmode == 1) {
if(crossOver(Smoothed, Trendline)){
enterLong();}
else if(crossUnder(Smoothed, Trendline)){
enterShort();}}
else if(Trendmode[0] == 1 && Trendmode[1] == 0) {
if(Smoothed > Trendline){
enterLong();}
else if(Smoothed < Trendline){
enterShort();}}
else if(Trendmode == 0){
if(crossOver(LeadSine, Sine)){
enterLong();}
else if(crossUnder(LeadSine, Sine)){
enterShort();}}
}

Re: Training not reproducible!? [Re: StefanCGN] #478371
10/09/19 17:09
10/09/19 17:09
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
These lines are bad:

Code
if(Smoothed > Trendline){

else if(Smoothed < Trendline){


I think you mean this:

Code
if(Smoothed[0] > Trendline[0]){

else if(Smoothed[0] < Trendline[0]){

Re: Training not reproducible!? [Re: StefanCGN] #478373
10/09/19 17:25
10/09/19 17:25
Joined: Jul 2019
Posts: 49
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

Joined: Jul 2019
Posts: 49
Köln
That's what i mean.... thanks! It helped :-)

Last edited by StefanCGN; 10/09/19 17:40.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1