MetaTrader 4 programming guide

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

Thread: MetaTrader 4 programming guide

  1. #1
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,011

    Default MetaTrader 4 programming guide


  2. #2

    Default

    Thanks Funyoo....Bill

  3. #3
    Junior Member
    Join Date
    May 2009
    Posts
    8

    Default

    Hello, Funyoo.

    I know that you are very busy as Admin but could you please direct me to
    how I can compile an MQL4 program so that I can get the .ex4 file. I am
    getting a "could not launch the compiler".

    Thanks for your help and reference
    daldup

  4. #4

    Default

    Quote Originally Posted by daldup View Post
    Hello, Funyoo.

    I know that you are very busy as Admin but could you please direct me to
    how I can compile an MQL4 program so that I can get the .ex4 file. I am
    getting a "could not launch the compiler".

    Thanks for your help and reference
    daldup
    I get this problem often when I'm out of memory. Have you done some EA optimisation which may have hogged some resources?

    A re-boot should do the trick. Either that or you need to replace your old ZX Spectrum.

  5. #5
    Junior Member PyeR2's Avatar
    Join Date
    Apr 2009
    Location
    Bondi Beach Australia
    Posts
    13

    Default Corrupt PDF ????

    Hi, I can't open the pdf in the 1st post. My Adobe reader says that the file is corrupt. I have re-downloaded 3 times but same thing every time.
    Would it be possible to check that the file is O.K. and re-upload if it is not.

    Cheers, Pye

  6. #6

    Default

    Pye, It downloads for me...(and it is a very good guide)....You may have other troubles. BillR

  7. #7
    Junior Member PyeR2's Avatar
    Join Date
    Apr 2009
    Location
    Bondi Beach Australia
    Posts
    13

    Default Thanx

    Quote Originally Posted by BillR View Post
    Pye, It downloads for me...(and it is a very good guide)....You may have other troubles. BillR
    Cheers, - Yeah it's weird. I normally use Orbit download manager however I think there is a bug with it because if turn it off & download the pdf normally it opens fine. Thanx for your post.

  8. #8

    Default

    Very nice.
    Thanks for sharing.

  9. #9

    Default

    thank you Mr funyoo for this file
    it give valuable info.

    best regards...

  10. #10

    Default Anyone can tell me this indicator can be code to EA ?

    Hi guys, i came across to this forum quite interesting, can anyone here tell me does this indicator can be code to EA ? (based on the buffer arrow appear on the screen straight away it enter position), if can, can guide me the important part on the coding ? im a totally new learner in mql4 as well...
    Thanks everyone

    #property indicator_chart_window
    #property indicator_buffers 2
    #property indicator_color1 White
    #property indicator_color2 White

    extern int Fast.MA.Period = 5;
    extern int Slow.MA.Period = 34;
    extern int Signal.period = 5;

    //---- buffers
    double Buffer1[],
    Buffer2[],
    b2[],
    b3[];
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //---- indicators

    // two additional buffers used for counting
    IndicatorBuffers(4);
    IndicatorShortName("test");
    SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,3);
    SetIndexArrow(0,242); // down 226 234 242
    SetIndexBuffer(0,b2);
    SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,3);
    SetIndexArrow(1,241); //UP 225 233 241
    SetIndexBuffer(1,b3);
    // These buffers are not plotted, just used to determine arrows
    SetIndexBuffer (2,Buffer1);
    SetIndexBuffer (3,Buffer2);
    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| Custor indicator deinitialization function |
    //+------------------------------------------------------------------+
    int deinit()
    {
    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    //| Custom indicator iteration function |
    //+------------------------------------------------------------------+
    int start()
    {
    int i, counted_bars=IndicatorCounted();
    double MA5,MA34;
    int limit=Bars-counted_bars;
    Print(" print limit = ", limit);
    if(counted_bars>0) limit++;
    // Main line
    for(i=0; i<limit; i++)
    {
    MA5=iMA(NULL,0,Fast.MA.Period,0,MODE_SMA,PRICE_MED IAN,i);
    MA34=iMA(NULL,0,Slow.MA.Period,0,MODE_SMA,PRICE_ME DIAN,i);
    Buffer1[i]=MA5-MA34;
    }
    // Signal line
    for(i=0; i<limit; i++)
    {
    Buffer2[i]=iMAOnArray(Buffer1,Bars,Signal.period,0,MODE_LWMA ,i);
    }
    // Arrows
    for(i=0; i<limit; i++)
    {
    if(Buffer1[i] > Buffer2[i] && Buffer1[i-1] < Buffer2[i-1])
    b2[i] = High[i]+50*Point;
    if(Buffer1[i] < Buffer2[i] && Buffer1[i-1] > Buffer2[i-1])
    b3[i] = Low[i]-50*Point;
    }
    return(0);
    }
    //+------------------------------------------------------------------+

Similar Threads

  1. Fractal divergence guide
    By MDunleavy in forum Trading discussion
    Replies: 56
    Last Post: 09-30-2014, 02:39
  2. VPS Guide to MT4
    By funyoo in forum Virtual private server
    Replies: 13
    Last Post: 09-07-2010, 14:26
  3. Need some EA guide...
    By ApacheDan in forum Ideas for expert advisors
    Replies: 4
    Last Post: 04-22-2010, 11:15
  4. Newbie Guide: How to use EA
    By fairylord in forum Expert advisors backtesting
    Replies: 10
    Last Post: 09-26-2009, 16:25
  5. Verb Guide to EA Optimization!
    By verbtheory in forum Expert advisors backtesting
    Replies: 3
    Last Post: 06-09-2009, 23:25

Posting Permissions

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


MetaTrader 4 programming guide


GadgetVersus GadgetVersus France W3Ask W3Ask Brasil W3Ask Deutschland W3Ask España W3Ask France W3Ask Italia W3Ask Nederland