Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Questions
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
  #1541 (permalink)  
Old 07-26-2009, 09:30 PM
Junior Member
 
Join Date: Mar 2009
Location: Slovenia
Posts: 11
Chistabo is on a distinguished road
Kalenzo MaMan!

Kalenzo!

Thank you for answer. I am aware of coding the way you replied, since brackets solve the mystery and remove the mist, although the question remains:
Does MQL calculates by written order or by mathematic logic - product (*) and divide (/) has priority before + and -?
Since I am learning MQL, I need to know the answer for further reference.

Love you all,

Have fun,

Simon
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
  #1542 (permalink)  
Old 07-26-2009, 09:38 PM
Senior Member
 
Join Date: Nov 2006
Posts: 308
luxinterior is on a distinguished road
Why not do a simple test yourself and answer your own question? That way you'll be 100% sure of the answer.

Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV
ForexArea.com
Users of Gap Trader from 'Forex-Assistant' MUST Read This
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
  #1543 (permalink)  
Old 07-26-2009, 10:42 PM
Junior Member
 
Join Date: Jul 2009
Posts: 3
LukeB is on a distinguished road
As this is a very 'c' like language, I'd be very suprized if the precidence was not as follows (from Order of Operations in Wikipedia). Personally, I'd use paranthesis as it gets too hard to read / remember by the time you get down to 5 and lower:
The relative precedence levels of operators found in many C-style languages is as follows:
1 () [] -> . :: Grouping, scope, array/member access
2 ! ~ - + * & sizeof type cast ++x --x (most) unary operations, sizeof and type casts
3 * / % Multiplication, division, modulo
4 + - Addition and subtraction
5 << >> Bitwise shift left and right
6 < <= > >= Comparisons: less-than, ...
7 == != Comparisons: equal and not equal
8 & Bitwise AND
9 ^ Bitwise exclusive OR
10 | Bitwise inclusive (normal) OR
11 && Logical AND
12 || Logical OR
13 ?: Conditional expression (ternary operator)
14 = += -= *= /= %= &= |= ^= <<= >>= Assignment operators
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
  #1544 (permalink)  
Old 07-27-2009, 08:04 AM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 723
Kalenzo is on a distinguished road
Quote:
Originally Posted by Chistabo View Post
Kalenzo!

Thank you for answer. I am aware of coding the way you replied, since brackets solve the mystery and remove the mist, although the question remains:
Does MQL calculates by written order or by mathematic logic - product (*) and divide (/) has priority before + and -?
Since I am learning MQL, I need to know the answer for further reference.

Love you all,

Have fun,

Simon
Hello!
Take a look here:
Operations and Expressions — MetaQuotes Language 4

"Each group of operations in the table has the same priority. The higher the priority is, the higher is the group's position in the table.
The execution order determines the grouping of operations and operands.Use parentheses to change the execution order of the operations."
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
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
  #1545 (permalink)  
Old 07-28-2009, 10:55 PM
Junior Member
 
Join Date: Mar 2009
Location: Slovenia
Posts: 11
Chistabo is on a distinguished road
Order of math function - reply received

Mis Amigos!

I thank you all for your reply and help (bow).

I indeed found answer to my question while retyping some scripts. But your answers revealed much more informations (thumb up).

Have fun,

Simon
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
  #1546 (permalink)  
Old 08-09-2009, 09:59 PM
Junior Member
 
Join Date: Nov 2005
Posts: 18
y09ster is on a distinguished road
Modify EA to works with FIFO

I 've been searching around , but still haven't find any guide How to modify EA to work with FIFO rules, What is the best way to implement this, Since i can't set SL any more..and how to Set TP to close first order if i have 2 order open on the same pair..

Can any one give me some tips and sample code..

Thanks

Last edited by y09ster; 08-09-2009 at 10:06 PM.
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
  #1547 (permalink)  
Old 08-10-2009, 09:43 PM
Junior Member
 
Join Date: Jun 2009
Posts: 10
mallet52 is on a distinguished road
help to code SL and TP

Hey guys,
I have a problem with an ea that I trying to use on a live ac with fxcm bt,
the problem is they won't allow the sl and tp to be placed with the market order,
so I need to get a code to somhow delay this by a few seconds,

any help on this would be most appricated
thankyou in advance
Attached Files
File Type: mq4 phoenix_ea_v5_6_04.mq4 (34.3 KB, 4 views)
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
  #1548 (permalink)  
Old 08-11-2009, 05:14 AM
marcelcorzo's Avatar
Senior Member
 
Join Date: Oct 2007
Location: Colombia
Posts: 238
marcelcorzo is on a distinguished road
Quote:
Originally Posted by mallet52 View Post
Hey guys,
I have a problem with an ea that I trying to use on a live ac with fxcm bt,
the problem is they won't allow the sl and tp to be placed with the market order,
so I need to get a code to somhow delay this by a few seconds,

any help on this would be most appricated
thankyou in advance
You can use the "sleep" function between each ordersend's or ordermodify's. For example:

Sleep(5000);

Thats a 5 seconds delay ( the sleep parameter is in miliseconds).

Regards,

Marcel.
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
  #1549 (permalink)  
Old 08-11-2009, 10:07 AM
newcoder's Avatar
Junior Member
 
Join Date: Jul 2009
Posts: 12
newcoder is on a distinguished road
ADX and MACD CrossOver

Senior members can anyone write a code for a crossover of the MACD and the ADX on a seperate window and and it crossover to place a dotted vertical line when it does. Hopefully, say a green one on the buy and a red for the sell. Also, an audible alert when it does.

Thanks so much.
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
  #1550 (permalink)  
Old 08-11-2009, 11:01 AM
Junior Member
 
Join Date: Jun 2009
Posts: 10
mallet52 is on a distinguished road
help needed to code delay for SL and TP

Hey guys,
I still haveing trouble getting my ea to work with fxcm bt,they tell me that I have a problem with the ea placing sl ant tp at the same time it puts in a market order,
Mladen kindly recoded this ea for so it would accept the 5 digit pricing and now this problem came up,
It would be great if somone could code the delay in to the ea that is needed for me,or explain it in great detail ( as I have no knowalge on how to code) and I will have a go at it myself, so I don't have to keep bothering everyone else.
thankyou in advance
and to all those who have helped me in the past
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

Tags
forex, histogram, JMASlope, ToR 1.20, ZUP_v1.mq4


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


All times are GMT. The time now is 04:48 AM.



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