Page 1 of 2 12 LastLast
Results 1 to 10 of 12
 3 Attachment(s)    

Thread: Indicator that needs expert coding for EA

  1. #1

    Default Indicator that needs expert coding for EA

    Hi guys. Im trying to get this awesome indicator into an EA, but just cant get the coding right.

    Can anyone help? I want it to open a trade when it makes a sell/buy arrow on the chart, rather than having to manual trade it, and then close it when the other signal appears, and uses that signal to buy/sell.

    Would be awesome.

    The indicator is about 90% accurate, and would make a kick ass EA.

    Thanks

    (Sorry for posting other one in wrong section)
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Feb 2009
    Posts
    25

    Default

    Hi, What Timeframe , currency to use and what are the stoploss, take profit rules etc?

  3. #3
    Junior Member
    Join Date
    Jan 2009
    Posts
    18

    Default

    oddly written indicator doesnt update in forward test

  4. #4
    Member
    Join Date
    Jan 2009
    Posts
    261

    Thumbs down

    Quote Originally Posted by Perky_z View Post
    oddly written indicator doesnt update in forward test
    as he said, this indicator could make a "kick ass EA"

  5. #5

    Default

    Quote Originally Posted by andytankm View Post
    Hi, What Timeframe , currency to use and what are the stoploss, take profit rules etc?
    It does EUR/USD, USD/CHF, GBP/USD, and USD/JPY. Its made for a 4H chart.

    It does update. The signals are the green and red dots that show up on the chart. If you comment out the alert box methods, then it works great:

    Code:
    
    #property indicator_chart_window
    #property indicator_buffers 2
    #property indicator_color1 Lime
    #property indicator_color2 Red
    
    extern int ADXbars = 14;
    extern int CountBars = 350;
    double g_ibuf_84[];
    double g_ibuf_88[];
    double g_iadx_92;
    double g_iadx_100;
    double g_iadx_108;
    double g_iadx_116;
    
    int init() {
       string ls_unused_0;
       IndicatorBuffers(2);
       SetIndexStyle(0, DRAW_ARROW);
       SetIndexArrow(0, 108);
       SetIndexStyle(1, DRAW_ARROW);
       SetIndexArrow(1, 108);
       SetIndexBuffer(0, g_ibuf_84);
       SetIndexBuffer(1, g_ibuf_88);
       return (0);
    }
    
    int start() {
       if (CountBars >= Bars) CountBars = Bars;
       SetIndexDrawBegin(0, Bars - CountBars);
       SetIndexDrawBegin(1, Bars - CountBars);
       int l_ind_counted_8 = IndicatorCounted();
       if (l_ind_counted_8 < 0) return (-1);
       if (l_ind_counted_8 < 1) {
          for (int li_0 = 1; li_0 <= CountBars; li_0++) g_ibuf_84[CountBars - li_0] = 0.0;
          for (li_0 = 1; li_0 <= CountBars; li_0++) g_ibuf_88[CountBars - li_0] = 0.0;
       }
       for (int li_4 = CountBars; li_4 >= 0; li_4--) {
          g_iadx_92 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, li_4 - 1);
          g_iadx_100 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, li_4);
          g_iadx_108 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, li_4 - 1);
          g_iadx_116 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, li_4);
          if (g_iadx_92 > g_iadx_108 && g_iadx_100 < g_iadx_116 && li_0 != 1) {
             g_ibuf_84[li_4] = Low[li_4] - 5.0 * Point;
           //  Alert("Buy Arrow", 
          //      "\n", "Current time is ", TimeToStr(TimeCurrent()), 
          //   "\n", Symbol());
             li_0++;
          }
          if (g_iadx_92 < g_iadx_108 && g_iadx_100 > g_iadx_116 && li_0 != 1) {
             g_ibuf_88[li_4] = High[li_4] + 5.0 * Point;
            // Alert("Sell Arrow", 
            //    "\n", "Current time is ", TimeToStr(TimeCurrent()), 
           //  "\n", Symbol());
             li_0++;
          }
       }
       return (0);
    }
    The only problem is that I cant get it to open or close a trade when the chart generates an arrow on the actual chart.

    Would be a really really profitable EA if it worked.

  6. #6
    Member
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    46

    Default Refresh

    Promising indy, But I have to delete from chart and re-attach, for it to update.
    I have removed annoying alerts. The refresh part needs to be sorted.

  7. #7
    Junior Member
    Join Date
    Jan 2009
    Posts
    18

    Default

    yu need to fiz it not updating trust me it doesnt
    if you change time frames on the charts then back dots appear were before there were none sad really

  8. #8
    Junior Member
    Join Date
    Jan 2009
    Posts
    18

    Default

    just wants to make me cry wen indicators dont work


    fixed version - well it doesnt repaint the dots - so a little more realistic -me thinks havent really tested it tho
    I like how it paints one dot back to current bar lol

    updates now

    tho im not sure i should post decomplied stuff lol
    Attached Files Attached Files
    Last edited by Perky_z; 11-07-2009 at 01:46.

  9. #9
    Junior Member
    Join Date
    Feb 2009
    Posts
    25

    Default

    Upon closer inspection.. it looks like a ADX Cross Over Indicator...

  10. #10
    Junior Member
    Join Date
    Jan 2009
    Posts
    18

    Default

    this one is a little more true to the picture
    i-1 really!!!!!!!!!!
    Attached Files Attached Files

Similar Threads

  1. Need indicator coding help for BW's Market Facilitaion Index.
    By SoonerBoomer in forum MQL programming
    Replies: 0
    Last Post: 09-04-2012, 15:29
  2. [REQ] Expert Advisor for this indicator
    By arfian in forum Ideas for expert advisors
    Replies: 3
    Last Post: 06-06-2011, 23:04
  3. Funyo - could you look at this coding for Sidus Indicator
    By Heatwray in forum Ideas for expert advisors
    Replies: 2
    Last Post: 11-29-2010, 02:06
  4. Any idea to coding EA for isakas kuskus indicator
    By mkairil in forum Ideas for expert advisors
    Replies: 0
    Last Post: 04-05-2010, 16:43
  5. Need indicator coding for price action system
    By forexpop in forum Indicators
    Replies: 1
    Last Post: 10-28-2009, 17:36

Tags for this Thread

100, adx, change, coding, color, eur, eur/usd, expert, high, indicator, indicators, low, manual, profit, profitable, repaint, signal, signals, stoploss, test, time, usd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •