help me to make this indicator become EA

 

pls somebody maybe can help me, i want to make this indicator become EA,

the condition is :

- open posisition when dot appear,

-if profit target reached will not open new position until opposite dot appear/or if not, becoz candle reverse, will open new position until new dot appear

-have SL/TP/Trailing stop

-this indi have an error, with the sound alert,its always sending sound continously

thank you, i really appreciate if someone can help me with this

<CODE REMOVED>

 
gunawan200:


thank you, i really appreciate if someone can help me with this

<CODE REMOVED>

I removed your code . . . .


Please edit your post above and re-insert your code using the SRC button . . . please use the SRC button to post code: How to use the SRC button.

To edit your post . . .

 

oh i'm so sorry,its my first time to make post, i,m newbie.....

thanks...

 
gunawan200: i want to make this indicator become EA,
  1. Why didn't you Edit your original post using SRC as requested instead of reposting?

    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. No you don't. You get the indicator values via iCustom Detailed explanation of iCustom - MQL4 forum
  3. So do it. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
  4. Your indicator is broken:
    Your Indicator recalculates ALL bars every tick (indicatorCounted is zero the first time and Bar-1 most other times) Do It right (First time all bars, only bar zero most other times.) Buffers auto initialize.
    int i,shift,counted_bars=IndicatorCounted();
    
    //---- check for possible errors
    if(counted_bars<0) return(-1);
    
    //---- initial zero
    if(counted_bars<1)
       {
        for(i=1;i<=CountBars;i++) val1[CountBars-i]=0.0;
        for(i=1;i<=CountBars;i++) val2[CountBars-i]=0.0;
       } 
    
    for (shift = CountBars; shift>=0; shift--)
    
    //b4plusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift+1);
      int lookback =       ADXbars                              +1;
      int i,shift,counted_bars=IndicatorCounted();
    
       //---- check for possible errors
       if(counted_bars<0) return(-1);
    
       if(counted_bars < lookback) counted_bars = lookback;
    for (shift = Bars - 1 - CountBars; shift>=0; shift--)
    

  5. Looking at the future - BAD Previous bar is i+1
    b4plusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift-1);
    nowplusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift);
    b4minusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift-1);
    nowminusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift); 
    
    b4plusdi=iADX(...,shift+1);
    nowplusdi=iADX(...,shift);
    b4minusdi=iADX(...,shift+1);
    nowminusdi=iADX(...,shift); 
    
 
Thank you, its really helpfull
 
gunawan200:

oh i'm so sorry,its my first time to make post, i,m newbie.....

thanks...

why didn't you edit your first post ?
 
how ? really soory, i use src already...
 
gunawan200:
how ? really soory, i use src already...

Not in the first post in this thread, you created a new, unnecessary post . .. please EDIT the first post in this thread. Move your mouse to the bottom corner of the post and a Edit link will appear . . . like this.

Reason: