Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


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 (2) Thread Tools Display Modes
  #241 (permalink)  
Old 08-18-2006, 04:16 AM
Junior Member
 
Join Date: Jun 2006
Posts: 15
autopips is on a distinguished road
Question read, not write

Quote:
Originally Posted by Kalenzo
If u specify the right properties in options of metatrader u can make string message and send it to u by SendMail() function, but better way is to use the dll made by codersguru witch can be found on his web page www.metatrader.info in the tools section.
thanks for the interesting link. - However, SendMail (or some dll substituting SendMail) cannot be of any help. The aim is not to send something, but the aim is to get the content of the alert window. - Or can the SPEECHTEXT tool from CodersGuru read these messages (and output them as string instead of as voice) ? Or did I misunderstand your answer ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #242 (permalink)  
Old 08-18-2006, 06:03 AM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 696
Kalenzo is on a distinguished road
Quote:
Originally Posted by autopips
thanks for the interesting link. - However, SendMail (or some dll substituting SendMail) cannot be of any help. The aim is not to send something, but the aim is to get the content of the alert window. - Or can the SPEECHTEXT tool from CodersGuru read these messages (and output them as string instead of as voice) ? Or did I misunderstand your answer ?
Well I'm not sure if u misunderstand something. Mabye it was me
Anyway, all messages are stored in log file int the expert log directory (experts/log) but that messages are not stored there in the real time. I mean the metatrader stores there all messages when u close it. If he is still running he will store there the last x lines (not all lines).

I think there can be 2 solutions from this situation:

1) Make a ea that will write your alerts into an external file (by the standard file functions) then, make a program (eg. in c++ or any other language) that will read that file every 30 seconds and check if there was added a new line, if yes then it will send u this line.

OR

2) u can use for eg. mysql library and connect to database, then write all alerts to database and read it from any place on earth, in any time u want to.

Hope it helps u
__________________
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!
Reply With Quote
  #243 (permalink)  
Old 08-18-2006, 03:57 PM
Junior Member
 
Join Date: Jan 2006
Posts: 27
boxingislife is on a distinguished road
is it possible to ask for an ea to be made?
i have a strategy thats simple i just need somebody to code it for me. im just not very familiar with coding and programming.
should i ask it in here if not please guide me to where i need to ask it and to who

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #244 (permalink)  
Old 08-18-2006, 05:32 PM
Junior Member
 
Join Date: Aug 2006
Posts: 1
pipspiner is on a distinguished road
Question Crossalert

Quote:
Originally Posted by codersguru
Hi newdigital,

Did you test the code? is it what do you want?
Hi coders guru and everyone,

while using the crossalert on a considerably large timeframs, such as M30 and H1, it happens to the MA's to cross several times temporarily before the bar finishes, wich makes a lot of signals for the same breakout(wich is not yet 100% formed) , is there a function in MQL that limits the alerts to only one?, or a code that makes alert only when the bar finishes.
i will really apreciate your help, as i'm trading the breakout with several pairs, this will help me a lot.
thank you all.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #245 (permalink)  
Old 08-18-2006, 07:06 PM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 696
Kalenzo is on a distinguished road
Quote:
Originally Posted by pipspiner
Hi coders guru and everyone,

while using the crossalert on a considerably large timeframs, such as M30 and H1, it happens to the MA's to cross several times temporarily before the bar finishes, wich makes a lot of signals for the same breakout(wich is not yet 100% formed) , is there a function in MQL that limits the alerts to only one?, or a code that makes alert only when the bar finishes.
i will really apreciate your help, as i'm trading the breakout with several pairs, this will help me a lot.
thank you all.
U can make variable in global section like alertBar and then add to condition
if(Bars>alertBar and other conditions)
{
Alert("ALERT ME!!!");
alertBar = Bars;
}
__________________
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!
Reply With Quote
  #246 (permalink)  
Old 08-18-2006, 09:29 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 399
iscuba11 is on a distinguished road
Smile I cannot find an example on how this should be written!

Nested If statement - 3 Conditions

I want to code an ea to activiate during 3 different time periods. How would I set this up?? I am not sure how to code a nested if conditional statement in MQ4. Where is all the examples to follow to code this language??

The rough times would be between the following GMT times.


6 to 9

11 to 16

18 to 24



Any help would be appreciated! I could not find an example on how to do this in your MQL4 educational materials??

Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #247 (permalink)  
Old 08-18-2006, 10:19 PM
Junior Member
 
Join Date: Jun 2006
Posts: 15
autopips is on a distinguished road
How to READ (not WRITE) alerts ?

Quote:
Originally Posted by autopips
Hello,

I know the function Alert() which means to WRITE an alert.
I need the reverse function: can MT4 also READ the messages of the alerts ?

One complicated way would be to send the alert by email to myself, then somehow get the content of the email and parse it, and then feed it into MT4 using a dll. How to do this exactly ? Or is there an easier way ?

Autopips
if you have given an EA or an indicator (the ex4 only, NOT the source),
and this EA writes some alerts into the alert window: what is the easiest way to get these alert messages into a string variable in realtime ? (The question is not how to WRITE an alert, that's what the alert() function is good for. I need to READ the alert. Also to write the alert message to a TXT file and read it from there is no solution, since exactly this message I do not have, so how should I write it ?)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #248 (permalink)  
Old 08-19-2006, 04:54 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 399
iscuba11 is on a distinguished road
Question

int start()
{

int Live_accnt = 16540; //<-- type the user LIVE ACCOUNT here before compiling
int Demo_accnt = 1180321; //<-- type the user DEMO ACCOUNT here befor compiling
int accnt = AccountNumber();

if (accnt != Live_accnt) // || Does not work!!

if (accnt != Demo_accnt)
{
Alert ("Wrong owner account (" + DoubleToStr(accnt,0) + ")");

etc. etc.

How do I get the program to do a logic statement for either or?
In this case above the security needs to accept either the Live_accnt or the Demo_accnt. How do I accomplish this. The " || " does not work as an or.

I really need your expertise on this! Thanks in advance.


Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #249 (permalink)  
Old 08-19-2006, 06:01 AM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 696
Kalenzo is on a distinguished road
Quote:
Originally Posted by iscuba11
int start()
{

int Live_accnt = 16540; //<-- type the user LIVE ACCOUNT here before compiling
int Demo_accnt = 1180321; //<-- type the user DEMO ACCOUNT here befor compiling
int accnt = AccountNumber();

if (accnt != Live_accnt) // || Does not work!!

if (accnt != Demo_accnt)
{
Alert ("Wrong owner account (" + DoubleToStr(accnt,0) + ")");

etc. etc.

How do I get the program to do a logic statement for either or?
In this case above the security needs to accept either the Live_accnt or the Demo_accnt. How do I accomplish this. The " || " does not work as an or.

I really need your expertise on this! Thanks in advance.


Dave
<><<<
If I understand u right, u want ea not to run if the account number is difrent than u specified in demo number or real number, so if account number will be difrent than 16540 or 1180321 the ea shouldnt work right? So the logic statement will look like this:

if (accnt != Live_accnt && accnt != Demo_accnt )
{
Alert("Wrong Account");
return(0);
}

or

if (accnt == Live_accnt || accnt == Demo_accnt )
{
//do my things
}
else
{
Alert("Wrong Account");
return(0);
}
__________________
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!
Reply With Quote
  #250 (permalink)  
Old 08-19-2006, 08:08 AM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 399
iscuba11 is on a distinguished road
Smile

Thank you many times over!!!!!! Really made my day. Someday, one day, hopefully before the rapture or I get as old as Moses, I may be able to be proficient at coding this language.

May God Bless You!

Reverend Dave
<><<<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
histogram, forex, ZUP_v1.mq4

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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
Posted By For Type Date
OzFx System:) - Page 639 This thread Refback 06-21-2008 10:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 12:46 PM


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



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