Gamestudio Links
Zorro Links
Newest Posts
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 529 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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