Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (opm), 778 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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