MQL4 - automated forex trading   /  

Code Base

Code Base  Expert Advisors  The aggressive semi-automated scalping EA To post a new code, please log in or register

This Expert Advisor is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
The aggressive semi-automated scalping EA [ ru ]
Author: Oguz Bayram (2009.12.01 15:47)
Rating: 1
Downloaded: 4584
Download:
 escape.mq4 (3.0 Kb) View

Hello, Coders

Here are the rules for this EA:

  1. Use on the EURUSD and EURGBP 1M charts. (You may try others as well)
  2. Confirm price direction manually on the 5M chart and choose Only Long, Only Short or Short and Long from the MT4 Properties dialog for the ea.
  3. Close open positions moving in the opposite direction of the current trend.

I'm not a coder, but I know that this is a counter trend system, which is really not my favorite for this style of trading. Please modify this code to open orders with the direction confirmation of two indicators (your choice), and to automatically close open positions moving in the opposite direction.

There is an ongoing forum discussion of this EA at http://www.forex-tsd.com/expert-advisors-metatrader-4/22058-aggressive-scalp-ea.html

Happy trading!

8 comments  To post a new comment, please log in or register

There are lots of updates and versions of this EA on its original forum:

http://www.forex-tsd.com/expert-advisors-metatrader-4/22058-aggressive-scalp-ea.html

Can anyone fully automate this expert using the indicators at this post, or similar indicators?

http://www.forex-tsd.com/expert-advisors-metatrader-4/22058-aggressive-scalp-ea-37.html#post333808

26.02.2010 06:59 pcbiz

This is a wonderful scalping EA, couldn't believe when i first saw it at work. But don't y'all think it's going to need a stoploss of say 50 pips even before the trail?


14.02.2010 02:36 shilox
can not

use... spoil... ea


08.02.2010 13:46 akeim

Can anyone add money management to this EA. I would like the lot size to increase as the equity rises and for the lot size to decrease as the equity goes down.

18.12.2009 00:24 pcbiz

Currently this EA does not trade on ECN brokers. Can anyone add that capability?

04.12.2009 00:56 pcbiz

Would someone please add a magic number to this EA? It is interfearing with other open trades.

03.12.2009 01:17 pcbiz
WHRoeder wrote:

This won't work:

bool ExistPositions() {
  for (int i=100; i<OrdersTotal(); i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      if (OrderSymbol()==Symbol()) {
        return(True);
      }
    } 
  } 
  return(false);
}

replace with:

bool ExistPositions() {
  for (int i=OrdersTotal()-1; i>=0; i-) if (
     OrderSelect(i, SELECT_BY_POS, MODE_TRADES)
  && OrderSymbol()==Symbol()) {
        return(True);
  } 
  return(false);
}

I use this section to specify the maximum number of open positions. Last night I changed "int i=100" to "int i=30" and it worked fine.

02.12.2009 01:19 pcbiz

This won't work:

bool ExistPositions() {
  for (int i=100; i<OrdersTotal(); i++) {
    if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
      if (OrderSymbol()==Symbol()) {
        return(True);
      }
    } 
  } 
  return(false);
}

replace with:

bool ExistPositions() {
  for (int i=OrdersTotal()-1; i>=0; i-) if (
     OrderSelect(i, SELECT_BY_POS, MODE_TRADES)
  && OrderSymbol()==Symbol()) {
        return(True);
  } 
  return(false);
}

01.12.2009 22:56 WHRoeder