Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, NeoDumont), 761 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
If solve reward you #474918
11/13/18 10:34
11/13/18 10:34
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
Hello guys i have very difficult problem. It will be easy for you.
Function trade1(){
Timeframe=1;
If (confition1){
If(asset("eur/jpy"))
Printf("Buyeurjpy");
Else if(asset("gbp/jpy"))
Printf("Buygbpjpy");

}
}
Function run(){
While(asset(loop("eur/jpy","gbp/jpy")))
While(algo(loop("code1")))
{
If(algo=="code1")
Trade1();
}
}


I run this. Condition1 met at eurjpy and gbpjpy at same time. Then gives me unwanted this result in zorro's display and log:

BuyeurjpyBuyeurjpy

Actually i need result of

BuyeurjpyBuygbpjpy

How can i solve this. If you help me i reward you:-)

Re: If solve reward you [Re: tuuPaul] #474919
11/13/18 11:47
11/13/18 11:47
Joined: Jan 2017
Posts: 95
Bulgaria
kvm Offline
Junior Member
kvm  Offline
Junior Member

Joined: Jan 2017
Posts: 95
Bulgaria
You should test the Asset variable not calling the asset() method again in your trade() function:
Code:
if(Asset == "eur/jpy")
  printf("Buyeurjpy");
else if(Asset == "gbp/jpy")
  printf("Buygbpjpy");


Re: If solve reward you [Re: kvm] #474920
11/13/18 11:53
11/13/18 11:53
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
Your chose is not work. I tried it before


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1