Forex



Go Back   Forex Trading > Training > Metatrader > Metatrader 4 mql 4 - Development course > Lessons
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

 
 
Thread Tools
 
Old 09-03-2007, 05:46 PM
Junior Member
 
Join Date: Aug 2007
Posts: 18
mercury_man is on a distinguished road
Please Help

Hello every one .
I have a problem in the expiration time .
I want to make the order be expire after 1 houre , what the right code to do that???

Code:
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,??????????????,Green);
thank you for help me.
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!
 
Old 09-03-2007, 06:18 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
Quote:
Originally Posted by mercury_man View Post
Hello every one .
I have a problem in the expiration time .
I want to make the order be expire after 1 houre , what the right code to do that???

Code:
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,??????????????,Green);
thank you for help me.
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,Time[0] + 3600,Green);
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!
 
Old 09-04-2007, 07:32 AM
Junior Member
 
Join Date: Aug 2007
Posts: 18
mercury_man is on a distinguished road
Thank you very much my dear .
Is chart time frame import ??? on which time frame must expert be opened
thank you again .
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!
 
Old 09-04-2007, 01:34 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
Quote:
Originally Posted by mercury_man View Post
Thank you very much my dear .
Is chart time frame import ??? on which time frame must expert be opened
thank you again .
Good point - it would depend on how much time has elapsed on the current bar...

To make it time-frame independent, use the following:

Code:
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,iTime(NULL,Period_M1,0) + 3600,Green);
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!
 
Old 09-04-2007, 02:18 PM
jlpi's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 336
jlpi is an unknown quantity at this point
Quote:
Originally Posted by omelette View Post
Good point - it would depend on how much time has elapsed on the current bar...

To make it time-frame independent, use the following:

Code:
OrderSend(Symbol(),OP_BUY ,Lots,Ask,1,Ask-loss*Point,Ask+profit*Point,"Mercury_Man",1,iTime(NULL,Period_M1,0) + 3600,Green);
In my opinion you should rather use TimeCurrent()+3600 because it is the current time on whatever time frame and it is not the time of the beginning of the candle. (but of course on M1 candles it doesn't make such a big difference)
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!
 
Old 09-04-2007, 03:00 PM
Senior Member
 
Join Date: Jan 2006
Posts: 1,119
omelette is on a distinguished road
Quote:
Originally Posted by jlpi View Post
In my opinion you should rather use TimeCurrent()+3600 because it is the current time on whatever time frame and it is not the time of the beginning of the candle. (but of course on M1 candles it doesn't make such a big difference)
Good point, I hadn't realised that, having never used TimeCurrent() in anger before. Thanks for pointing that out.
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!
 
Old 09-05-2007, 07:38 AM
Junior Member
 
Join Date: Aug 2007
Posts: 18
mercury_man is on a distinguished road
Quote:
Originally Posted by jlpi View Post
In my opinion you should rather use TimeCurrent()+3600 because it is the current time on whatever time frame and it is not the time of the beginning of the candle. (but of course on M1 candles it doesn't make such a big difference)
Thank you very much jlpi

Quote:
Originally Posted by omelette View Post
Good point, I hadn't realised that, having never used TimeCurrent() in anger before. Thanks for pointing that out.
thank you very much omelette
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!
 

Bookmarks
Thread Tools

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 05:30 AM.



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