Forex
Google

Go Back   Forex Trading > Discussion Areas > General Discussion
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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 10-23-2005, 01:16 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of
Question MetaTrader 4 *.mqh File

Hello

request what is MetaTrader 4 *.mqh File :confused:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-23-2005, 01:27 PM
quksilver quksilver is offline
Junior Member
 
Join Date: Oct 2005
Posts: 14
quksilver is on a distinguished road
It's a library header file. Like a .h file in C. Can contain common variable definitions and function definitions so you don't have to include them in every single expert.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-23-2005, 02:10 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Thumbs up That's right

Quote:
Originally Posted by quksilver
It's a library header file. Like a .h file in C. Can contain common variable definitions and function definitions so you don't have to include them in every single expert.
That's right!

Besides:

When you use the Preprocessor #include like that in your code:

#include <stderror.mqh>

The MQL4 compiler will replace this line of code with the code found in the file "stderror.mqh".

If you open any “mqh” file you will find it contains two things:

1- Importing the library it will use
2- Definitions of the variables and functions of the imported library.

For example this is the code of stdlib.mqh

//+------------------------------------------------------------------+
//| stdlib.mqh |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#import "stdlib.ex4"

string ErrorDescription(int error_code);
int RGB(int red_value,int green_value,int blue_value);
bool CompareDoubles(double number1,double number2);
string DoubleToStrMorePrecision(double number,int precision);
string IntegerToHexString(int integer_number);


Here the code:
1- imports "stdlib.ex4"
2- Write the definitions of the variables and functions of the imported library.

When you include "stdlib.mqh" in your code you can use its 5 functions:
ErrorDescription, RGB, CompareDoubles, DoubleToStrMorePrecision and IntegerToHexString.


to know more please refer to my MQL4 Course

Regards,
Coder's Guru
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-24-2005, 04:28 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of
Thumbs up

Thanks all
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-17-2005, 12:46 PM
alosh alosh is offline
Junior Member
 
Join Date: Nov 2005
Posts: 6
alosh is on a distinguished road
nice

vary nice...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-31-2007, 02:01 PM
aparsai's Avatar
aparsai aparsai is offline
Senior Member
 
Join Date: May 2006
Posts: 824
aparsai is on a distinguished road
Quote:
Originally Posted by codersguru
That's right!

Besides:

When you use the Preprocessor #include like that in your code:

#include <stderror.mqh>

The MQL4 compiler will replace this line of code with the code found in the file "stderror.mqh".

If you open any “mqh” file you will find it contains two things:

1- Importing the library it will use
2- Definitions of the variables and functions of the imported library.

For example this is the code of stdlib.mqh

//+------------------------------------------------------------------+
//| stdlib.mqh |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#import "stdlib.ex4"

string ErrorDescription(int error_code);
int RGB(int red_value,int green_value,int blue_value);
bool CompareDoubles(double number1,double number2);
string DoubleToStrMorePrecision(double number,int precision);
string IntegerToHexString(int integer_number);


Here the code:
1- imports "stdlib.ex4"
2- Write the definitions of the variables and functions of the imported library.

When you include "stdlib.mqh" in your code you can use its 5 functions:
ErrorDescription, RGB, CompareDoubles, DoubleToStrMorePrecision and IntegerToHexString.


to know more please refer to my MQL4 Course

Regards,
Coder's Guru
Thanks very much.
__________________
Disclaimer: If you trade my EAs or systems or taking my advice including but not limited to selecting a broker, you are doing so at your own discretion. Forex is a risky business. You may lose substantial amount of money by taking the risk of live trading. I shall not be held responsible for your losses or problems of any kind with the broker.
PipBoxer.com / PBHelp.com / ForexBrace.com (Free MQL Training) / GridBoxer.com / Investatech.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trailing file newdigital Tools and utilities 15 05-28-2008 03:14 PM
How to open a .HST FILE HellGungrave_777 Metatrader 4 4 06-22-2007 03:54 AM
What is .set file? maniek Questions 0 03-31-2006 08:20 PM
Mt3 EXP file forexpipmaster General Discussion 7 02-03-2006 05:17 PM
I can not attach a file WhatFor Non Related Discussions 4 11-03-2005 05:16 PM


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