Forex



Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 06-23-2007, 08: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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 06-23-2007, 09:00 AM
Member
 
Join Date: Apr 2006
Posts: 83
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 09:04 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 06-23-2007, 09: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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
dose it posible to creat any function of "mql code" posting in this forum? phoenix MetaTrader 23 09-23-2009 04:10 PM
"Gordago Stock Optimizer" - easily generates Expert Advisors De Vinci Tools and utilities 18 04-12-2009 02:01 AM
How to "teach" and to use the AI ("neuron") EA? danil Suggestions for Trading Systems 5 07-15-2008 05:26 PM


All times are GMT. The time now is 02:47 PM.



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