Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
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 (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 01-13-2008, 10:49 PM
Dan7974's Avatar
Dan7974 Dan7974 is offline
Senior Member
 
Join Date: Jul 2006
Posts: 264
Dan7974 is on a distinguished road
Expiration

How do I code the expiration for my pending Orders?

i.e.,

PHP Code:
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask,25,Ask-50*Point,Ask+50*Point,"",0,ExpirationGreen); 
What do I set in the
PHP Code:
Expiration 
to make my pending Orders Delete in 1 hour?
__________________
God Bless Everyone, and their trading logic.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-13-2008, 10:55 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
Set the time from now in seconds.
For example if you want the order to expire after 30 minutes then you have to use this:

PHP Code:
int expire_at TimeCurrent() + (30 60 ); 
Quote:
Originally Posted by Dan7974 View Post
How do I code the expiration for my pending Orders?

i.e.,

PHP Code:
OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask,25,Ask-50*Point,Ask+50*Point,"",0,ExpirationGreen); 
What do I set in the
PHP Code:
Expiration 
to make my pending Orders Delete in 1 hour?
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-14-2008, 12:40 AM
Dan7974's Avatar
Dan7974 Dan7974 is offline
Senior Member
 
Join Date: Jul 2006
Posts: 264
Dan7974 is on a distinguished road
Thank You so much!!!!!!!
It works!!!
__________________
God Bless Everyone, and their trading logic.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-09-2008, 02:55 PM
fxgrm's Avatar
fxgrm fxgrm is offline
Member
 
Join Date: Mar 2007
Posts: 86
fxgrm is on a distinguished road
How to code an EA to show max margin level?

Hello:

Can someone tell me how to add the code so an EA will show max margin level % inccurred?

Thanks

Last edited by fxgrm : 02-13-2008 at 12:33 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-09-2008, 03:31 PM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 15,160
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
It should be on this thread How to LOCK/Encrypt EA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-09-2008, 04:42 PM
fxgrm's Avatar
fxgrm fxgrm is offline
Member
 
Join Date: Mar 2007
Posts: 86
fxgrm is on a distinguished road
Q for Newdigital or other?

Dumb question I'm sure.

Can you tell me the easiest way to convert EA's ex4 to an mq4 file?

Thanks

Last edited by fxgrm : 02-13-2008 at 12:24 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-09-2008, 05:11 PM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 15,160
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
MetaEditor.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-09-2008, 05:33 PM
fxgrm's Avatar
fxgrm fxgrm is offline
Member
 
Join Date: Mar 2007
Posts: 86
fxgrm is on a distinguished road
Hi newdigital:

I understanf now that ex4 protects file so can't be undone. Thanks

Sorry for all the basic questions.

Cheers

Last edited by fxgrm : 02-13-2008 at 12:26 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-09-2008, 06:11 PM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 15,160
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
First of all you must decide: is it EA or indicator?
Because everything should be placed in different folders ...
This post will help you http://www.forex-tsd.com/92940-post7.html
So, after placing your, let's say, EA in right foder you must open MetaEditor.
It is more good to open MetaEditor from MetaTrader.
I am having few copies of Metatrader in my PC so if I do not want to be confused about which MetaEditor for which Metatrader so I am openning MetaEditor from Metatrader: right mouse click on any indicator and select "Modify". MetaEditor will be opened.

Find your EA (or indicator) in MetaEditor.
Use this one:

12wwd.jpg

or this menu:

12wwd1.jpg

And open your EA (or indicator) and compile it. Just click on this one:

12wwd2.jpg

If you have any errors so you will see it here:

12wwd3.jpg

If no error so you can find your ex4. Do you remember the forder where you placed your EA or indicator?
This post http://www.forex-tsd.com/92940-post7.html

So go to the same folder and you will find your ex4 file.

If you want to change your ex4? Do the same - compile the code and MetaEditor will generate new ex4.

Because Metatrader is using ex4 files.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-09-2008, 06:14 PM
fxgrm's Avatar
fxgrm fxgrm is offline
Member
 
Join Date: Mar 2007
Posts: 86
fxgrm is on a distinguished road
Thumbs up Newdigital

Thanks a million. You do an awesome job on this forum!
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

LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/11801-expiration.html
Posted By For Type Date
World of Forex Trading » Expiration This thread Pingback 01-14-2008 01:05 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting An Expiration Date On Indicator emersond Indicators - Metatrader 4 10 08-05-2007 09:33 AM
EA expiration date jyrik Expert Advisors - Metatrader 4 6 04-12-2007 04:32 PM
Place expiration on EA troydavis1010 General Discussion 1 04-10-2007 09:05 PM


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