Forex



Go Back   Forex Trading > Trading systems > Ema Cross
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

View Poll Results: What do you think about Counter-Trend strategies?
They are good. 233 30.66%
They are bad. 122 16.05%
Good strategies! But have to be well programmed. 268 35.26%
I don’t know what you are talking about. 154 20.26%
Multiple Choice Poll. Voters: 760. You may not vote on this poll

Reply
 
Thread Tools Display Modes
  #111 (permalink)  
Old 02-16-2006, 12:34 AM
Audio's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 139
Audio is an unknown quantity at this point
nowonder some said it cant be done!

Last edited by Audio; 02-16-2006 at 02:10 AM.
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!
Reply With Quote
  #112 (permalink)  
Old 02-16-2006, 05:06 AM
Junior Member
 
Join Date: Nov 2005
Posts: 16
dedywind is on a distinguished road
@codersguru:

thank you for great effort...

After attached your EA (http://www.forex-tsd.com/9264-post100.html) in 4pair eur/usd, gbp/usd, usd/chf, gbp/jpy.... three pair immediately started open trade (gbp/usd, usd/chf, gbp/jpy) and all of them have good result....


I dont know anything about programming... but based on this advised:

Quote:
Originally Posted by gkozlyk
For the arrows being reversed, just swap the 2 arrow numbers in the code, then problem is solved. Compile afterward for it to take effect on all charts the indicator is applied to

Graham
I do make small change in EA:

if(line1>line2)current_direction = 1; //up
if(line1<line2)current_direction = 2; //down

To

if(line1>line2)current_direction = 2; //up
if(line1<line2)current_direction = 1; //down

Yesterday, I attached this EA to neuimex demo account TF30 in four pair.... and all of them have good result to....

I will continue to forward testing those EA for another 2/3 weeks....
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!
Reply With Quote
  #113 (permalink)  
Old 02-16-2006, 05:22 AM
gkozlyk's Avatar
Senior Member
 
Join Date: Feb 2006
Posts: 203
gkozlyk is on a distinguished road
In the next modification i might put in another switch so if users want to do reverse trades on the cross they can (as in if the fast EMA goes above the slow, you do a sell). In my visual backtesting, it seems less profitable than going with the cross immediately then as the trades gets older looking for a reverse trade.

Another idea i had was to maybe wait a bar to take the trade after the cross (this might prevent those times the currency pokes through then goes the other way)

I found another EMA cross program on this website had some good ideas.

CROSSING EMA 5 x EMA 13
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!
Reply With Quote
  #114 (permalink)  
Old 02-16-2006, 06:04 AM
Senior Member
 
Join Date: Jan 2006
Posts: 128
radicalmoses is on a distinguished road
Codersguru,

With respect to the MM part of trading.

Starting with 10,000$ account:

(account equity * risk %)/ largest loss = lots to trade


(10,000* 10%)/ 50= 2 lots


This is assuming SL is 50pips.

So the account has to be adjusted every trade with this formula.

I hope this helps.

But before you incorporate this formula, please tell me what kinda
win/loss ratio and risk/reward ratio are you expecting for this system.
We can then build once we know that.

Accordingly we can adjust the risk % to 10 or 15%.
Also your typical largest loss will be equal to your SL since that will be maximum you can loose on any one trade. The risk % also has to take into account maximum drawdown or largest consecutive losses so that we can tide over the drawdown.

Hope that helps. Anyone disagree with this MM please point it out so that we improve.

The results which we get in a backtest usually just takes a standard 1 lot trade for every trade. So if we incorporate MM, the equity growth is multiplied by several times. That is the magic of MM.

Most people concentrate on finding the best systems, but the real holy grail is MM. You can make an average system into a super system by MM itself.
As I had pointed out in my earlier post, the following example will make it obvious.

win - 74%

Without Money Management

Initial equity - 20,000$
Final Equity - 251,813$

With MM
initial equity - 30,000$
Final equity - 582,930,624 $$$$$$$$$$$$$$$

Thats right! thats 5.82 million $!

The values are theoritical, however the message is pretty clear.

Last edited by radicalmoses; 02-16-2006 at 10:29 AM.
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!
Reply With Quote
  #115 (permalink)  
Old 02-16-2006, 06:06 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow

Quote:
Originally Posted by dedywind
@codersguru:

thank you for great effort...

After attached your EA (http://www.forex-tsd.com/9264-post100.html) in 4pair eur/usd, gbp/usd, usd/chf, gbp/jpy.... three pair immediately started open trade (gbp/usd, usd/chf, gbp/jpy) and all of them have good result....


I dont know anything about programming... but based on this advised:



I do make small change in EA:

if(line1>line2)current_direction = 1; //up
if(line1<line2)current_direction = 2; //down

To

if(line1>line2)current_direction = 2; //up
if(line1<line2)current_direction = 1; //down

Yesterday, I attached this EA to neuimex demo account TF30 in four pair.... and all of them have good result to....

I will continue to forward testing those EA for another 2/3 weeks....
You have reversed the direction of the cross, EMA CROSS will work in both directions but it originally based on taking the reverse direction of the market.
__________________
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #116 (permalink)  
Old 02-16-2006, 11:05 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Talking New version

Hi folks,

Firstly, I want to thank you all for your shares and useful comments
Secondly, I have updated the EMA CROSS expert advisor to version 2.

I hope you find it useful!
Attached Images
File Type: gif StrategyTester.gif (5.1 KB, 881 views)
Attached Files
File Type: mq4 EMA_CROSS_2.mq4 (6.7 KB, 873 views)
File Type: htm StrategyTester.htm (200.8 KB, 581 views)
__________________
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #117 (permalink)  
Old 02-17-2006, 03:32 AM
Audio's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 139
Audio is an unknown quantity at this point
Talking

I try to do the back for 1 and 2 codersguru ea ,test on eur/usd ,D1 it open .5 lot . Donno what I click ,I lost the result test on forward demo acct for 1 week it is up $# 1025 # . only on eur/usa .
Attached Images
File Type: gif TesterGraph.gif (7.2 KB, 751 views)
File Type: gif 2.gif (8.8 KB, 727 views)

Last edited by Audio; 02-17-2006 at 03:46 AM.
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!
Reply With Quote
  #118 (permalink)  
Old 02-17-2006, 04:07 AM
kohzadi's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Tehran-IR Iran
Posts: 110
kohzadi is on a distinguished road
A question

Hi codersguru and all members
I have a question and I am newbie in forex.
Can we use an EA in offline? or we must be online for using an EA?

Last edited by kohzadi; 02-17-2006 at 04:10 AM.
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!
Reply With Quote
  #119 (permalink)  
Old 02-17-2006, 04:13 AM
cockeyedcowboy's Avatar
Senior Member
 
Join Date: Nov 2005
Posts: 480
cockeyedcowboy is on a distinguished road
Coders Guru

I have quickly looked at the codeing of your new version and have a few questions about the code.




The first has to do with this block of code below;

Code:

static int TimeFrame;

   ...
   ...
   ...


int init()
  {
   TimeFrame=Period();
    return(0);
  }


   ...
   ...
   ...


int Crossed (double line1 , double line2)
   {
      static int last_direction = 0;
      static int current_direction = 0;
      
      if(TimeFrame!=Period())
      {
         TimeFrame=Period();
         return (0);
      }
      if(line1>line2)current_direction = 1; //up
      if(line1<line2)current_direction = 2; //down

   ...
   ...
   ...
What is the purpose of the TimeFrame Parameter in this content?






The second code block that is giving me some questions is the purpose of the function isNewSymbol?

Code:
bool isNewSumbol(string current_symbol)
  {
   //loop through all the opened order and compare the symbols
   int total  = OrdersTotal();
   for(int cnt = 0 ; cnt < total ; cnt++)
   {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      string selected_symbol = OrderSymbol();
      if (current_symbol == selected_symbol)
      return (False);
    }
    return (True);
}

   ...
   ...
   ...


   total  = OrdersTotal();

   if(total < 1 || isNewSumbol(Symbol())) 
     {
       if(isCrossed == 1)
 
   ...
   ...
   ...

I know that you are very busy but could you please explain the purpose of these and why they are needed.



Thanks for your time,

The CockeyedCowboy
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!
Reply With Quote
  #120 (permalink)  
Old 02-17-2006, 01:52 PM
codersguru's Avatar
Senior Member
 
Join Date: Oct 2005
Posts: 994
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Blocks of code!

Quote:
Originally Posted by cockeyedcowboy
Coders Guru

I have quickly looked at the codeing of your new version and have a few questions about the code.




The first has to do with this block of code below;

Code:

static int TimeFrame;

   ...
   ...
   ...


int init()
  {
   TimeFrame=Period();
    return(0);
  }


   ...
   ...
   ...


int Crossed (double line1 , double line2)
   {
      static int last_direction = 0;
      static int current_direction = 0;
      
      if(TimeFrame!=Period())
      {
         TimeFrame=Period();
         return (0);
      }
      if(line1>line2)current_direction = 1; //up
      if(line1<line2)current_direction = 2; //down

   ...
   ...
   ...
What is the purpose of the TimeFrame Parameter in this content?






The second code block that is giving me some questions is the purpose of the function isNewSymbol?

Code:
bool isNewSumbol(string current_symbol)
  {
   //loop through all the opened order and compare the symbols
   int total  = OrdersTotal();
   for(int cnt = 0 ; cnt < total ; cnt++)
   {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      string selected_symbol = OrderSymbol();
      if (current_symbol == selected_symbol)
      return (False);
    }
    return (True);
}

   ...
   ...
   ...


   total  = OrdersTotal();

   if(total < 1 || isNewSumbol(Symbol())) 
     {
       if(isCrossed == 1)
 
   ...
   ...
   ...
I know that you are very busy but could you please explain the purpose of these and why they are needed.



Thanks for your time,

The CockeyedCowboy
CockeyedCowboy,

I used the first block of code to be sure that the changing of the chart period will not affect the program.
For example: if you attached the expert advisor to M30 chart and the Short EMA line was above the Long EMA line in the M30 chart, Then you clicked the D1 button and changed the timeframe to daily timeframe and the you was unlucky and the Short EMA line in the D1 chart was below the Long EMA in this chart. The expert advisor will consider it a crossing and open a trade. But with the above code i give it a chance to remember the last time frame and wait for another tick.

I used the second block of code to check the currently opened trades and prevent the expert advisor to trade in the same pair twice.
__________________
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
ANG3110@latchess.com, coders guru ema cross, Cross, cross ema, cross forex, ema 34, ema cross, ema cross ea, ema cross expert, ema cross expert advisor, ema cross indicator, ema cross signal, ema ea, ema forex, EMACross3, ema_cross_2, forex, forex EMA, forex ema cross, forex ema cross ea, forex ema ea, Sidus, universalmacross


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Cross! creative Indicators - Metatrader 4 191 11-15-2009 04:51 PM
3 MA cross demontaz Indicators - Metatrader 4 3 09-21-2009 06:36 PM
MA cross/Price cross MA EA Pipsta_UK Expert Advisors - Metatrader 4 5 05-10-2007 09:50 PM
ema cross 1f4 General Discussion 5 05-21-2006 04:13 PM


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



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