Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-23-2007, 07:56 AM
Junior Member
 
Join Date: Dec 2006
Posts: 5
kxracer500 is on a distinguished road
Are there no "and" "or" operators in mql4??

I am just learning to code mql4 and it appears as though there are no "and" "or" operators which are common to almost any programming language. In the mql4 documentation it gives the usual bitwise and logical operators but no "and" "or". Does this mean that all expressions comparing various conditions will have to be a complicated combination of nested if else and switch statements. Is there no way to write an expression such as this in mql4 without using nested if or switch statements: if(((a>b) and (e>b)) or (r>s)) {} ?

Thank you for your time
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-23-2007, 08:00 AM
Member
 
Join Date: Apr 2006
Posts: 67
ejoi is on a distinguished road
Quote:
Originally Posted by kxracer500 View Post
I am just learning to code mql4 and it appears as though there are no "and" "or" operators which are common to almost any programming language. In the mql4 documentation it gives the usual bitwise and logical operators but no "and" "or". Does this mean that all expressions comparing various conditions will have to be a complicated combination of nested if else and switch statements. Is there no way to write an expression such as this in mql4 without using nested if or switch statements: if(((a>b) and (e>b)) or (r>s)) {} ?

Thank you for your time
use this && for "and"
|| for "or"

example
if(((a>b) && (e>b)) || (r>s))
{
blah blah blah
}

Last edited by ejoi; 06-23-2007 at 08:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-23-2007, 08:14 AM
Junior Member
 
Join Date: Dec 2006
Posts: 5
kxracer500 is on a distinguished road
thanks, ejoi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to "teach" and to use the AI ("neuron") EA? danil Suggestions for Trading Systems 5 07-15-2008 04:26 PM
dose it posible to creat any function of "mql code" posting in this forum? phoenix Metatrader Programming 20 05-28-2008 03:08 PM
"Gordago Stock Optimizer" - easily generates Expert Advisors De Vinci Tools and utilities 4 05-31-2007 01:27 PM


All times are GMT. The time now is 10:09 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.