"

ADXcrosses

by Dr.Hamdi Boukamcha
Name:
ADXcrosses
Author: Collector (2006.08.08 16:24)
Rating: 9.6
Downloaded: 22552
Download:
ADXcrosses   ADXcrosses.mq4 (3.4 Kb) View
ADXcrosses Indicator.

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

razor_cell

how far with the EA is it working now,can you help me with it

my email is [email protected]

 

thanks

02.07.2013 15:48 08023105152

razor_cell:
Hi Collector

I’m trying to integrate this strategy to an EA, but i get a lot of signals (Buy or Sell).

this a simple implementation in a simple EA, because i think i didn’t understood your system, I’ v changed the shift values to 1 for the ‘previous’ and 2 ‘actual’

//+------------------------------------------------------------------+
//|                                               ADX crosses EA.mq4 |
//|                                                    Khalifa rmili |
//|                                                                  |
//+------------------------------------------------------------------+

double b4plusdi, b4minusdi, nowplusdi, nowminusdi;
double   price = 0;
double t_tp = 0;
double t_sl = 0;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
         b4plusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
         b4minusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_MINUSDI, 0);

        nowplusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_PLUSDI, 1);
        nowminusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_MINUSDI, 1); 

        //----
        if(b4plusdi > b4minusdi && nowplusdi < nowminusdi)
        { //BUY
            price = NormalizeDouble(Ask,Digits);
            t_tp = price+(15*Point);         
            t_sl = price-(40*Point);
            OrderSend(Symbol(),OP_BUY,0.1,price,3,t_sl,t_tp);
        }
        //----
        if(b4plusdi < b4minusdi && nowplusdi > nowminusdi)
        {
            price = NormalizeDouble(Bid,Digits);        
            t_tp = price-(15*Point);         
            t_sl = price+(40*Point);
            OrderSend(Symbol(),OP_BUY,0.1,price,3,t_sl,t_tp);
         }
//----
   return(0);
  }
//+------------------------------------------------------------------+

But this is the result:

02:29:35 ADX crosses EA EURUSD,M5: loaded successfully
02:29:35 ADX crosses EA started for testing
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #1 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #2 buy 0.10 EURUSD at 1.3939 sl: 1.3899 tp: 1.3954 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #3 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #4 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #5 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #6 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #7 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #8 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #9 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #10 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #11 buy 0.10 EURUSD at 1.3942 sl: 1.3902 tp: 1.3957 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #12 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #13 buy 0.10 EURUSD at 1.3942 sl: 1.3902 tp: 1.3957 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #14 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok

 

The only thing ADXCrosses does is evaluating the two components of ADX: +DI and -DI.

If +DI > -DI is a bull trend.

If -DI > +DI is a bear trend.

The indicator simply places an arrow where the two of them have shifted. You should filter those signals.

17.02.2012 17:47 flaab

hii….. i loved this indicator !!!!!

could you please code it to make an excellent EA ?

Any effort would be much appreciated !

Thanks again for the indicator 🙂

14.09.2011 13:18 makzer

Hi Collector

I’m trying to integrate this strategy to an EA, but i get a lot of signals (Buy or Sell).

this a simple implementation in a simple EA, because i think i didn’t understood your system, I’ v changed the shift values to 1 for the ‘previous’ and 2 ‘actual’

//+------------------------------------------------------------------+
//|                                               ADX crosses EA.mq4 |
//|                                                    Khalifa rmili |
//|                                                                  |
//+------------------------------------------------------------------+

double b4plusdi, b4minusdi, nowplusdi, nowminusdi;
double   price = 0;
double t_tp = 0;
double t_sl = 0;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
         b4plusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
         b4minusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_MINUSDI, 0);

        nowplusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_PLUSDI, 1);
        nowminusdi = iADX(NULL, 240, 14, PRICE_CLOSE, MODE_MINUSDI, 1); 

        //----
        if(b4plusdi > b4minusdi && nowplusdi < nowminusdi)
        { //BUY
            price = NormalizeDouble(Ask,Digits);
            t_tp = price+(15*Point);         
            t_sl = price-(40*Point);
            OrderSend(Symbol(),OP_BUY,0.1,price,3,t_sl,t_tp);
        }
        //----
        if(b4plusdi < b4minusdi && nowplusdi > nowminusdi)
        {
            price = NormalizeDouble(Bid,Digits);        
            t_tp = price-(15*Point);         
            t_sl = price+(40*Point);
            OrderSend(Symbol(),OP_BUY,0.1,price,3,t_sl,t_tp);
         }
//----
   return(0);
  }
//+------------------------------------------------------------------+

But this is the result:

02:29:35 ADX crosses EA EURUSD,M5: loaded successfully
02:29:35 ADX crosses EA started for testing
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #1 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #2 buy 0.10 EURUSD at 1.3939 sl: 1.3899 tp: 1.3954 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #3 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #4 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #5 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #6 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #7 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #8 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #9 buy 0.10 EURUSD at 1.3940 sl: 1.3900 tp: 1.3955 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #10 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #11 buy 0.10 EURUSD at 1.3942 sl: 1.3902 tp: 1.3957 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #12 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #13 buy 0.10 EURUSD at 1.3942 sl: 1.3902 tp: 1.3957 ok
02:29:52 2010.11.02 07:20 ADX crosses EA EURUSD,M5: open #14 buy 0.10 EURUSD at 1.3941 sl: 1.3901 tp: 1.3956 ok

 

28.03.2011 05:40 razor_cell

Is it works for all pair and timeframe.?
03.01.2011 17:54 lazim2010

01.11.2010 10:51 jassim

Great indicater! Would it be possible to get an EA for this where the buy & sell are executed on every arrow?
Thanks in advance….

13.03.2010 01:01 stewge409

I like the indicator, but do the arrows disappear if the price moves in the opposite direction?

18.01.2010 05:03 Sixteen

This is the best indicator I have come across.Well done.

Is it possible to set the alarm when the bullish arrow forms under the bull candle and when the bearish arrow forms above the bear candle?

If possible,please let me know.My E-mail is [email protected]

Thanks again.

Share this article

Leave a comment