Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, LorraineJones, VoroneTZ, Akow), 1,446 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Doing 2 things at the same time with if function #447606
12/21/14 17:18
12/21/14 17:18
Joined: Apr 2014
Posts: 23
M
Mothership Offline OP
Newbie
Mothership  Offline OP
Newbie
M

Joined: Apr 2014
Posts: 23
Hey!

What should I type if I want my script to do 2 things if something happens. Say that I want to place 1 long trade and 1 short trade when 2 MAs crosses.

I don't seem to get it to work by typing the following:


If(crossOver(MA1,MA2))
enterLong();
enterShort();

Re: Doing 2 things at the same time with if function [Re: Mothership] #447608
12/21/14 18:30
12/21/14 18:30
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi Mothership. Your code associates only the enterLong with the if. Try {}.

HTH.


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