Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AbrahamR, wdlmaster, 7th_zorro, dr_panther, 1 invisible), 764 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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,729
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,729
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