Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 7th_zorro), 923 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Optimize Stop with multi Asset strategy #473565
07/22/18 18:57
07/22/18 18:57
Joined: Apr 2018
Posts: 37
S
sdelatorre Offline OP
Newbie
sdelatorre  Offline OP
Newbie
S

Joined: Apr 2018
Posts: 37
Hello,

Every barperiod I calculate some numbers and with them I build a pair (EUR/USD) or maybe another I don't know it.

Now I would like optimize Stop but when I write : stop=optimize(30,5,50,10)*PIP.

The result is only the first pair that the strategy builds and then stops the training.
I try get from the result something that:
EUR/USD:RSI:30
EUR/CAD:50
.....
.....
How I can train for every pair that strategy trades ?

Thanks in advance

Re: Optimize Stop with multi Asset strategy [Re: sdelatorre] #473566
07/22/18 19:48
07/22/18 19:48
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
Did you put your optimize statement inside an asset loop?

Re: Optimize Stop with multi Asset strategy [Re: Dalla] #473579
07/24/18 08:07
07/24/18 08:07
Joined: Apr 2018
Posts: 37
S
sdelatorre Offline OP
Newbie
sdelatorre  Offline OP
Newbie
S

Joined: Apr 2018
Posts: 37

If I put inside gives me Error incosistence call.

I put out

Re: Optimize Stop with multi Asset strategy [Re: sdelatorre] #473580
07/24/18 13:58
07/24/18 13:58
Joined: Feb 2017
Posts: 1,726
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,726
Chicago
Be careful with the uppercase.

Change stop to Stop.

Re: Optimize Stop with multi Asset strategy [Re: AndrewAMD] #473581
07/24/18 14:24
07/24/18 14:24
Joined: Apr 2018
Posts: 37
S
sdelatorre Offline OP
Newbie
sdelatorre  Offline OP
Newbie
S

Joined: Apr 2018
Posts: 37

I put "Stop" my code:

while(Name = (loop(Assets)))

{
while(algo(loop("RSI")))
{
if(Algo == "RSI") {

if(assetType(Name) != FOREX)
continue; // Currency pairs only
asset(Name

Stop=optimize(30,10,50,10)*PIP;

int a=strcmp(Name,par2);
int b=strcmp(Name,par3);


if (a==0){short(par2); }

if (b==0){large(par3);}
}
}
}

And Zorro shows: 040:incosistence NZD/JPy:RSI optimize calls!

I think that NZD/JPY is the first pair that code builds.


ANy idea ? Thanks


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