Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,555 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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