BUY FXO Forum Shares
1316
Shares in the BANK:
We BuyWe Sell
$1.8467$1.9038
Results 1 to 5 of 5

Thread: Need some help building an EA!

  1. #1
    Bullish aLa_miKu's Avatar
    Join Date
    Dec 2007
    Posts
    93
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need some help building an EA!

    Hi!
    I would like if someone will help me build an EA from my ideeas...
    I think what i want will work... or if it won`t ... we will make it work

    Some of my toughts:
    RSI 5 min 14
    RSI 4h 21
    MACD ( 4h )

    If macd = downtrend & rsi 14 < 20 & rsi 21 <50 SELL
    - TS 10 points / TP 15 points
    - SL 15 points
    If macd = uptrend & rsi >20 & rsi 21> 50 BUY
    - TS 10 points / TP 15 points
    - SL 15 points

    Can anyone make this simple EA ?

  2. #2
    Elder Analyst mrfx's Avatar
    Join Date
    Nov 2007
    Location
    depan PC
    Posts
    506
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by aLa_miKu View Post
    Hi!
    I would like if someone will help me build an EA from my ideeas...
    I think what i want will work... or if it won`t ... we will make it work

    Some of my toughts:
    RSI 5 min 14
    RSI 4h 21
    MACD ( 4h )

    If macd = downtrend & rsi 14 < 20 & rsi 21 <50 SELL
    - TS 10 points / TP 15 points
    - SL 15 points
    If macd = uptrend & rsi >20 & rsi 21> 50 BUY
    - TS 10 points / TP 15 points
    - SL 15 points

    Can anyone make this simple EA ?
    are you trying to generate a new EA?
    ..::Free USD$100+USD$25..FxMALAY::..
    sm_cool ..::Basic For Newbie+Simple Profit Technicque::..sm_cool




    sm_win "money is not everything but everything needs money"sm_win [/I]

  3. #3
    Bullish aLa_miKu's Avatar
    Join Date
    Dec 2007
    Posts
    93
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes but i don`t know mql4 that`s why i ask if someone can help me

  4. #4
    In Profit
    Join Date
    Jan 2008
    Location
    www.untuk-semua.blogspot.com
    Posts
    219
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    u could use the link on this thread

    http://forum.fxopen.com/showthread.p...7856#post77856

    and if u could use it tell us if it`s work

    i`m going to try this link too
    like KDZA said:
    "pedang yang sama akan berbeda keampuhannya apabila pemakainya berkembang dari anak kecil jadi dewasa yang terlatih"

  5. #5
    Piplet
    Join Date
    Oct 2007
    Posts
    7
    FXO Shares
    0
    FXO Bonus
    0.000
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Catch it - all numbers are optimizable as external params.
    Of course, you need both M5 and H4 data in your terminal to use or test it - simply open M5 and H4 charts before testing.
    Ask questions if smth is not clear
    Code:
    #property copyright "Dagnar"
    #property link      ""
    extern int       rsi1_per=14;    //RSI M5 (fast rsi) period 
    extern double    rsi1_buy=70.0;  //rsi(m5)>rsi1_buy - buy signal
    extern double    rsi1_sell=30.0; //rsi(m5)<rsi1_sell - sell signal
    extern int       rsi2_per=21;    //RSI H4 (slow rsi) period 
    extern double    rsi2_buy=50.0;  //rsi(H4)>rsi2_buy - buy signal
    extern double    rsi2_sell=50.0; //rsi(H4)<rsi2_sell - sell signal
    extern int       MACD_fast=12;   //MACD fast_ema period   (MACD[1]-MACD[2]>0 - uptrend)
    extern int       MACD_slow=26;   //MACD slow_ema period   (MACD[1]-MACD[2]<0 - downtrend)
    extern int       TP=15;          //TakeProfit level, pp (if 0, no TP)
    extern int       TS=10;          //Breakeven level, pp (moves SL to OpenPrice when reached) (if 0, no TS)
    extern int       SL=15;          //Initial StopLoss level, pp (if 0, no SL)
    extern double    Lot=0.1;        //Lot size
    extern int       INVERSE=0;      // inverts buy/sell signals if non-zero
    extern bool      Work_on_Time0=true;   //EA works only at new bar first tick if "true"
    int Magic=123456,t=0;
    double loss,take;
    int init()
      {if (TP==0) take=0; else take=1;
       if (SL==0) loss=0; else loss=1;
       return(0);}
    int deinit()
      {  return(0); }
    int start()
      {
       if (Time[0]==t && Work_on_Time0) return(0);
       t=Time[0];
       bool buy=false,sell=false,allow=true;
       int i,total;
       total=OrdersTotal();
       for(i=0; i<=total;i++) {
          OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
          if (OrderMagicNumber()==Magic && OrderSymbol()==Symbol())  allow=false;
          if (OrderMagicNumber()==Magic && OrderSymbol()==Symbol()) {
            if (OrderType()==OP_BUY && Bid-OrderOpenPrice()>=TS*Point && OrderStopLoss()!=OrderOpenPrice() && TS!=0) OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0);
            if (OrderType()==OP_SELL && OrderOpenPrice()-Ask>=TS*Point && OrderStopLoss()!=OrderOpenPrice() && TS!=0) OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0);
            }
          }
       double rsi1=iRSI(Symbol(),PERIOD_M5,rsi1_per,PRICE_CLOSE,1);
       double rsi2=iRSI(Symbol(),PERIOD_H4,rsi2_per,PRICE_CLOSE,1);
       double macd=iMACD(Symbol(),PERIOD_H4,MACD_fast,MACD_slow,9,PRICE_CLOSE,MODE_MAIN,1)-iMACD(Symbol(),PERIOD_H4,MACD_fast,MACD_slow,9,PRICE_CLOSE,MODE_MAIN,2);
       if (macd<0 && rsi1<rsi1_sell && rsi2 < rsi2_sell) sell=true;
       if (macd>0 && rsi1>rsi1_buy && rsi2 > rsi2_buy) buy=true;
       if (INVERSE!=0) {
          bool inv=buy;
          buy=sell;
          sell=inv;
       }
       if (allow && buy) OrderSend(Symbol(),OP_BUY,Lot,Ask,3,(Ask-SL*Point)*loss,(Ask+TP*Point)*take,"demo_EA",Magic,0,Blue);
       if (allow && sell) OrderSend(Symbol(),OP_SELL,Lot,Bid,3,(Bid+SL*Point)*loss,(Bid-TP*Point)*take,"demo_EA",Magic,0,Red);
       
       return(0);
      }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Disclaimer
2005-2016 © FXOpen All rights reserved. Various trademarks held by their respective owners.

Risk Warning:: Trading on the Forex market involves substantial risks, including complete possible loss of funds and other losses and is not suitable for all members. Clients should make an independent judgment as to whether trading is appropriate for them in the light of their financial condition, investment experience, risk tolerance and other factors.

FXOpen Markets Limited, a company duly registered in Nevis under the company No. C 42235. FXOpen is a member of The Financial Commission.

FXOpen AU Pty Ltd., a company authorised and regulated by the Australian Securities & Investments Commission (ASIC). AFSL 412871ABN 61 143 678 719.

FXOpen Ltd. a company registered in England and Wales under company number 07273392 and is authorised and regulated by the Financial Conduct Authority (previously, the Financial Services Authority) under FCA firm reference number 579202.

FXOpen does not provide services for United States residents.

Join us