Gamestudio Links
Zorro Links
Newest Posts
Can't plot daily high & low
by Zheka. 10/14/19 18:39
TWS "Market closed" fix
by jcl. 10/14/19 15:09
2xCapital slider to increase size
by jcl. 10/14/19 14:03
Imgui Lite-c Development
by txesmi. 10/13/19 09:40
A9
by Dooley. 10/11/19 18:53
Need Help Finding Cause of Crash
by Dooley. 10/11/19 18:51
What algorithm is used for BALANCED?
by JamesHH. 10/11/19 17:32
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
7 registered members (exile, Dooley, Dalla, kvm, sdh309795gaas, jibanes, Zheka), 661 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
FrankW, TedMar, raimucuk, vivaldi2, filip
18304 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: 9
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

Joined: Jul 2019
Posts: 9
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: 769
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 769
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: 9
Köln
S
StefanCGN Offline OP
Newbie
StefanCGN  Offline OP
Newbie
S

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

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

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