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
  #1111 (permalink)  
Old 06-04-2008, 06:08 PM
Junior Member
 
Join Date: Oct 2006
Posts: 12
forexcel is on a distinguished road
Thank you for your help. I will try it tonight and will let you know.

Regards,

forexcel


Quote:
Originally Posted by IN10TION View Post
if(MathAbs(Open[i]-Close[i])*1/Point<=2)


this will do it for you...
let me know
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1112 (permalink)  
Old 06-05-2008, 02:07 PM
Junior Member
 
Join Date: Oct 2006
Posts: 12
forexcel is on a distinguished road
Hi IN10TION'

I tried it last night and it worked great....
Thanks a million


Regards,
Forexcel



Quote:
Originally Posted by IN10TION View Post
if(MathAbs(Open[i]-Close[i])*1/Point<=2)


this will do it for you...
let me know
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1113 (permalink)  
Old 06-05-2008, 03:53 PM
kiromano's Avatar
Junior Member
 
Join Date: Feb 2008
Posts: 4
kiromano is on a distinguished road
Question Indicator arrow as a dash

Guru,

I have been racking my brain to figure out how to get my indicator to use a simple dash instead of Wingdings. I am trying to avoid using ObjectCreate if possible. I know there must be a simple way, because it's listed in the online help at MT4 site. If I'm reading it correctly the number 4 should be a dash, however when I use the number 4 as and arrow, it gives me the default checkmark.

I'm not looking for a dashed line, just a single dash to mark a point on any given bar.

Great thread, by the way.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1114 (permalink)  
Old 06-05-2008, 08:48 PM
inzider's Avatar
Senior Member
 
Join Date: Mar 2008
Location: GMT-5
Posts: 220
inzider is on a distinguished road
Hi CodersGuru,

What kind of code would I need to make an EA Buy at exact cross on stochastic but make it wait at least new bar to apply the close position rules but still apply SL-TP-TS.

And also to make the EA wait until next opposite cross to take another position.

Thanks for your good work!
__________________
Common Sens Indicators Active!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1115 (permalink)  
Old 06-06-2008, 12:40 AM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 806
TheRumpledOne is an unknown quantity at this point
I would like to know what bar the highest high and lowest low occurred for today on H1 or less time periods.

I know I can use a for loop and check.

Is there a more elegant way to do this?

Is there a first bar of today function?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1116 (permalink)  
Old 06-06-2008, 04:50 AM
Senior Member
 
Join Date: Nov 2006
Posts: 122
Yoda_Glenn is on a distinguished road
How do I add an expiration date to my EA?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1117 (permalink)  
Old 06-06-2008, 07:52 AM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 433
Blog Entries: 1
IN10TION is on a distinguished road
int start(){
if (TimeCurrent()>D'2008.06.15 12:00:00'){Comment("sorry, expired!"); return(0);}

...

}

Quote:
Originally Posted by Yoda_Glenn View Post
How do I add an expiration date to my EA?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1118 (permalink)  
Old 06-06-2008, 08:24 AM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 433
Blog Entries: 1
IN10TION is on a distinguished road
iBarShift will find for you the bar that start on that day or also the end bar for that day.

int iBarShift( string symbol, int timeframe, datetime time, bool exact=false)

next...

use those bar positions to find the results of iHighest and iLowest

int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)
int iLowest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0)


results & done



Quote:
Originally Posted by TheRumpledOne View Post
I would like to know what bar the highest high and lowest low occurred for today on H1 or less time periods.

I know I can use a for loop and check.

Is there a more elegant way to do this?

Is there a first bar of today function?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1119 (permalink)  
Old 06-06-2008, 04:27 PM
Senior Member
 
Join Date: Nov 2006
Posts: 122
Yoda_Glenn is on a distinguished road
Quote:
Originally Posted by IN10TION View Post
int start(){
if (TimeCurrent()>D'2008.06.15 12:00:00'){Comment("sorry, expired!"); return(0);}

...

}
I copied and pasted this code under the "Initialization" part of my EA's code, and then I got this error message:

'start' - function already defined and has a body


What could I be doing wrong? Thanks!

Last edited by Yoda_Glenn; 06-06-2008 at 04:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #1120 (permalink)  
Old 06-06-2008, 04:50 PM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 433
Blog Entries: 1
IN10TION is on a distinguished road
you are almost there
yes you have a "init" part (initialization) and also a "start" part...
put it in the start part as I did it in the example...

why?
1. because init will run only ones, in the "start" part it will block continues.
2. your error message = you can't use a start() into a init() function

Have a nice weekend


Quote:
Originally Posted by Yoda_Glenn View Post
I copied and pasted this code under the "Initialization" part of my EA's code, and then I got this error message:

'start' - function already defined and has a body


What could I be doing wrong? Thanks!

Last edited by IN10TION; 06-06-2008 at 04:52 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
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 09:53 PM
Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart This thread Refback 12-08-2007 11:46 AM


All times are GMT. The time now is 04:34 PM.



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