Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
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
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Quad, EternallyCurious, 1 invisible), 726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 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