Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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 02-25-2007, 08:54 PM
Junior Member
 
Join Date: Jan 2007
Posts: 4
rajatnaik is on a distinguished road
EMA Cross Price[URGENT]

Hi,
i am writing a EA to calculate the cross price for EMA. How can i determine at what price the crossover has taken place???
Basially, how does one track if the 5 EMA has crossed over the 20 EMA...???

1.Ema period=5 with shift of -1
>>> 2.Ema period= 20 (no shift)

Open -Close-Open (reverse position)
Open- Close- New order...could be several orders inside a bar
If Requote, always a YES

Last edited by rajatnaik; 05-31-2007 at 09:27 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2007, 10:36 PM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
What makes your message "urgent"?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2007, 12:35 AM
Senior Member
 
Join Date: Feb 2006
Location: New Zealand
Posts: 249
Craig is on a distinguished road
Because he can't wait to be rich!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2007, 01:55 AM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
The actual answer to his question is very simple. However, it ticked me off to see the first post by a member marked as urgent.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-31-2007, 09:21 AM
Junior Member
 
Join Date: Jan 2007
Posts: 4
rajatnaik is on a distinguished road
Was marked urgent as a 6 month Testbench results are to be compared with and posted here.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-31-2007, 04:33 PM
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
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
Quote:
Originally Posted by rajatnaik
Hi,
i am writing a EA to calculate the cross price for EMA. How can i determine at what price the crossover has taken place???
Basially, how does one track if the 5 EMA has crossed over the 20 EMA...???

1.Ema period=5 with shift of -1
>>> 2.Ema period= 20 (no shift)

Open -Close-Open (reverse position)
Open- Close- New order...could be several orders inside a bar
If Requote, always a YES
For EA so: if price close so ma with 0 is crossing ma with 0. And one bar ago (+1 bar if it is close mode) ma is below or above the other ma with 1 bar as well.
If ma with other mode (not close price mode) so it is 1 and 2.
- (minus) 1 bar is the future.

"Future is not set". We have a thread with this "Future is not set" indicator (based on tartan's indicator for Goldwarrior EA).

There are a lot of EAs developed on this forum concerning MA crossing. As I remember Codersguru developed some EMA crossing EAs - look here http://www.forex-tsd.com/ema-cross/

Besides there is thread with 3 EMA crossing EA here.

You may take it from this examples (attached):
1. MA_ExpertProfit.mq4: it is the same EA but it will close the orders in s/l or t/p only.

2. MA_ExpertProfit_all.mq4: it will close the order on s/l or t/p, or on the other crossing signal. This EA should work on particular account only. Just change the line "int Account = 111111;" to your account number inside the code. For example your account is 1235463. So this line should be like this:
int Account = 1235463;

3. MA_ExpertProfit_noacc.mq4: it is the same with item # 2. But without any account and it may work in any account (i mean account in Metatrader).

And check this very good thread as well Universal MA Cross EA
Attached Files
File Type: mq4 MA_ExpertProfit.mq4 (7.0 KB, 31 views)
File Type: mq4 MA_ExpertProfit_all.mq4 (7.2 KB, 26 views)
File Type: mq4 MA_ExpertProfit_noacc.mq4 (7.0 KB, 25 views)

Last edited by newdigital; 05-31-2007 at 04:37 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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MA cross/Price cross MA EA Pipsta_UK Expert Advisors - Metatrader 4 5 05-10-2007 08:50 PM
Price Line MA Cross Money Duck Expert Advisors - Metatrader 4 3 04-12-2007 08:36 AM
Urgent !!! junglelion Expert Advisors - Metatrader 4 10 02-15-2007 03:37 PM
MA cross PRICE level ... EA mistrz-swiata Expert Advisors - Metatrader 4 26 01-16-2007 05:47 PM
urgent plz waleed9091 Expert Advisors - Metatrader 4 5 05-14-2006 09:45 PM


All times are GMT. The time now is 01:27 AM.



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