logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
trader123  
#1 Posted : Saturday, April 11, 2009 9:17:49 PM(UTC)
trader123

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/12/2009(UTC)
Posts: 1

Hi, I have a question about the IF statement. I want to write an IF statement where if X is true, buy (aka execute condition A), otherwise execute condition B. What is the correct way to write it? Thanks a lot! J
johnl  
#2 Posted : Monday, April 13, 2009 9:30:16 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

If([this is true],[do this],[otherwise do this])

Replace the [brackets] with your logic.

henry1224  
#3 Posted : Tuesday, April 14, 2009 5:25:03 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
You could eliminate an if statement simply by writing Buy-Sell
johnl  
#4 Posted : Tuesday, April 14, 2009 7:19:47 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Hi Henry:
I am always interested in getting rid of IF statements. Could you point me in a direction
of a simple example of your logic in code form. Thanks.

wabbit  
#5 Posted : Tuesday, April 14, 2009 7:50:39 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.