InstaForex

Valid untill : Unlimited

Mulai tanggal 24 Agustus 2013 Forum indomoneytalk.com tidak menerima pemasangan iklan lagi. Terima kasih.
Starting on August 24, 2013 Forum indomoneytalk.com not accept advertising again. Thank you.

Results 1 to 9 of 9

Thread: Alert SMA-EMA CrossOver1.mq4

  1. #1
    admin
    Guest

    Alert SMA-EMA CrossOver1.mq4

    [spoiler][/spoiler]


    Code :

    [spoiler]//+------------------------------------------------------------------+
    //| Alert SMA-EMA CrossOver.mq4 |
    //| Copyright © 2007, MetaQuotes Software Corp. |
    //| http://www.metaquotes.net |
    //+------------------------------------------------------------------+
    #property copyright "Copyright © 2007, MetaQuotes Software Corp."
    #property link "http://www.metaquotes.net"

    #property indicator_chart_window
    #property indicator_buffers 4
    #property indicator_color1 Red
    #property indicator_color2 Aqua
    #property indicator_color3 DodgerBlue
    #property indicator_color4 Magenta

    //---- Variables Externes
    extern int SMAPeriod = 13;
    extern int EMAPeriod = 6;
    extern int TimeFrame = 240;
    extern bool Email = True;

    //---- Indicateurs
    double SMACurrent, SMAPrevious, EMACurrent, EMAPrevious;
    int nShift, digit, digits;
    int i,j,limit,counted_bars;

    //---- Buffers
    double ExtMapBuffer1[]; //SMA
    double ExtMapBuffer2[]; //EMA
    double ExtMapBuffer3[]; //Fleche Haut
    double ExtMapBuffer4[]; //Fleche Bas
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //---- indicators
    //---- Styles et couleur des Lignes
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);
    SetIndexStyle(1,DRAW_LINE);
    SetIndexBuffer(1,ExtMapBuffer2);
    //---- Styles et couleur des Fleches
    SetIndexStyle(2, DRAW_ARROW, 0, 1); // Fleche vers le haut
    SetIndexArrow(2, 233);
    SetIndexBuffer(2, ExtMapBuffer3);
    SetIndexStyle(3, DRAW_ARROW, 0, 1); // Fleche vers le bas
    SetIndexArrow(3, 234);
    SetIndexBuffer(3, ExtMapBuffer4);
    //----
    switch(Period())
    {
    case 1: nShift = 1; break;
    case 5: nShift = 3; break;
    case 15: nShift = 5; break;
    case 30: nShift = 10; break;
    case 60: nShift = 15; break;
    case 240: nShift = 20; break;
    case 1440: nShift = 80; break;
    case 10080: nShift = 100; break;
    case 43200: nShift = 200; break;
    }
    //----
    digits = MarketInfo(Symbol(),MODE_DIGITS);
    //----
    return(0);
    }

    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function |
    //+------------------------------------------------------------------+
    int deinit()
    {
    //----

    //----
    return(0);
    }

    //+------------------------------------------------------------------+
    //| Custom indicator iteration function |
    //+------------------------------------------------------------------+
    int start()
    {
    counted_bars=IndicatorCounted();
    //----
    if(counted_bars<0)
    return(-1);
    if(counted_bars>0)
    counted_bars--;
    limit=Bars-counted_bars;

    for(i=0; i<limit; i++)
    {
    SMACurrent=iMA(NULL,TimeFrame,SMAPeriod,0,MODE_SMA ,PRICE_CLOSE,i);
    SMAPrevious=iMA(NULL,TimeFrame,SMAPeriod,0,MODE_SM A,PRICE_CLOSE,i+1);
    ExtMapBuffer1[i]=SMACurrent;
    EMACurrent=iMA(NULL,TimeFrame,EMAPeriod,0,MODE_EMA ,PRICE_CLOSE,i);
    EMAPrevious=iMA(NULL,TimeFrame,EMAPeriod,0,MODE_EM A,PRICE_CLOSE,i+1);
    ExtMapBuffer2[i]=EMACurrent;
    //---- Dessin des fleches, future entré en trade
    //---- Buy
    if((EMACurrent > SMACurrent+ digit*Point) && ( EMAPrevious <= SMACurrent)) // Croisement WMA8 up bord supérieur du tunnel
    {
    ExtMapBuffer3[i] = Low[i] - nShift*Point;
    Alert("SMA-EMA CrossOver Going for a BUY Trend Sesion ",SMACurrent," Price ",Close[1]," for ", Symbol(),"-",Period());
    PlaySound("alert.wav");
    if (Email)
    {
    SendMail("SMA-EMA CrossOver", "SMA-EMA CrossOver Going for a BUY Trend Sesion "+DoubleToStr(SMACurrent, digits)+" Price "+DoubleToStr(Close[1], digits)+" for "+Symbol()+"-"+Period());
    }
    }
    //---- Sell
    if((SMACurrent > EMACurrent+ digit*Point) && ( EMAPrevious >= SMACurrent)) // Croisement WMA8 down bord inférieur du tunnel
    {
    ExtMapBuffer4[i] = High[i] + nShift*Point;
    Alert("SMA-EMA CrossOver Going for a SELL Trend Sesion ",SMACurrent," Price ",Close[1]," for ", Symbol(),"-",Period());
    PlaySound("alert.wav");
    if (Email)
    {
    SendMail("SMA-EMA CrossOver", "SMA-EMA CrossOver Going for a SELL Trend Sesion "+DoubleToStr(SMACurrent, digits)+" Price "+DoubleToStr(Close[1], digits)+" for "+Symbol()+"-"+Period());
    }
    }
    }
    //----
    return(0);
    }
    //+------------------------------------------------------------------+[/spoiler]

  2. #2
    admin
    Guest

    Alert SMA-EMA CrossOver1.mq4

    [spoiler][/spoiler]


    Code :

    [spoiler]//+------------------------------------------------------------------+
    //| Alert SMA-EMA CrossOver.mq4 |
    //| Copyright © 2007, MetaQuotes Software Corp. |
    //| http://www.metaquotes.net |
    //+------------------------------------------------------------------+
    #property copyright "Copyright © 2007, MetaQuotes Software Corp."
    #property link "http://www.metaquotes.net"

    #property indicator_chart_window
    #property indicator_buffers 4
    #property indicator_color1 Red
    #property indicator_color2 Aqua
    #property indicator_color3 DodgerBlue
    #property indicator_color4 Magenta

    //---- Variables Externes
    extern int SMAPeriod = 13;
    extern int EMAPeriod = 6;
    extern int TimeFrame = 240;
    extern bool Email = True;

    //---- Indicateurs
    double SMACurrent, SMAPrevious, EMACurrent, EMAPrevious;
    int nShift, digit, digits;
    int i,j,limit,counted_bars;

    //---- Buffers
    double ExtMapBuffer1&#91;]; //SMA
    double ExtMapBuffer2&#91;]; //EMA
    double ExtMapBuffer3&#91;]; //Fleche Haut
    double ExtMapBuffer4&#91;]; //Fleche Bas
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //---- indicators
    //---- Styles et couleur des Lignes
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);
    SetIndexStyle(1,DRAW_LINE);
    SetIndexBuffer(1,ExtMapBuffer2);
    //---- Styles et couleur des Fleches
    SetIndexStyle(2, DRAW_ARROW, 0, 1); // Fleche vers le haut
    SetIndexArrow(2, 233);
    SetIndexBuffer(2, ExtMapBuffer3);
    SetIndexStyle(3, DRAW_ARROW, 0, 1); // Fleche vers le bas
    SetIndexArrow(3, 234);
    SetIndexBuffer(3, ExtMapBuffer4);
    //----
    switch(Period())
    {
    case 1: nShift = 1; break;
    case 5: nShift = 3; break;
    case 15: nShift = 5; break;
    case 30: nShift = 10; break;
    case 60: nShift = 15; break;
    case 240: nShift = 20; break;
    case 1440: nShift = 80; break;
    case 10080: nShift = 100; break;
    case 43200: nShift = 200; break;
    }
    //----
    digits = MarketInfo(Symbol(),MODE_DIGITS);
    //----
    return(0);
    }

    //+------------------------------------------------------------------+
    //| Custom indicator deinitialization function |
    //+------------------------------------------------------------------+
    int deinit()
    {
    //----

    //----
    return(0);
    }

    //+------------------------------------------------------------------+
    //| Custom indicator iteration function |
    //+------------------------------------------------------------------+
    int start()
    {
    counted_bars=IndicatorCounted();
    //----
    if(counted_bars<0)
    return(-1);
    if(counted_bars>0)
    counted_bars--;
    limit=Bars-counted_bars;

    for(i=0; i<limit; i++)
    {
    SMACurrent=iMA(NULL,TimeFrame,SMAPeriod,0,MODE_SMA ,PRICE_CLOSE,i);
    SMAPrevious=iMA(NULL,TimeFrame,SMAPeriod,0,MODE_SM A,PRICE_CLOSE,i+1);
    ExtMapBuffer1[i]=SMACurrent;
    EMACurrent=iMA(NULL,TimeFrame,EMAPeriod,0,MODE_EMA ,PRICE_CLOSE,i);
    EMAPrevious=iMA(NULL,TimeFrame,EMAPeriod,0,MODE_EM A,PRICE_CLOSE,i+1);
    ExtMapBuffer2[i]=EMACurrent;
    //---- Dessin des fleches, future entré en trade
    //---- Buy
    if((EMACurrent > SMACurrent+ digit*Point) && ( EMAPrevious <= SMACurrent)) // Croisement WMA8 up bord supérieur du tunnel
    {
    ExtMapBuffer3[i] = Low[i] - nShift*Point;
    Alert("SMA-EMA CrossOver Going for a BUY Trend Sesion ",SMACurrent," Price ",Close[1]," for ", Symbol(),"-",Period());
    PlaySound("alert.wav");
    if (Email)
    {
    SendMail("SMA-EMA CrossOver", "SMA-EMA CrossOver Going for a BUY Trend Sesion "+DoubleToStr(SMACurrent, digits)+" Price "+DoubleToStr(Close[1], digits)+" for "+Symbol()+"-"+Period());
    }
    }
    //---- Sell
    if((SMACurrent > EMACurrent+ digit*Point) && ( EMAPrevious >= SMACurrent)) // Croisement WMA8 down bord inférieur du tunnel
    {
    ExtMapBuffer4[i] = High[i] + nShift*Point;
    Alert("SMA-EMA CrossOver Going for a SELL Trend Sesion ",SMACurrent," Price ",Close[1]," for ", Symbol(),"-",Period());
    PlaySound("alert.wav");
    if (Email)
    {
    SendMail("SMA-EMA CrossOver", "SMA-EMA CrossOver Going for a SELL Trend Sesion "+DoubleToStr(SMACurrent, digits)+" Price "+DoubleToStr(Close[1], digits)+" for "+Symbol()+"-"+Period());
    }
    }
    }
    //----
    return(0);
    }
    //+------------------------------------------------------------------+[/spoiler]

  3. #3

    Re: Alert SMA-EMA CrossOver1.mq4

    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu

  4. #4

    Re: Alert SMA-EMA CrossOver1.mq4

    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu

  5. #5
    admin
    Guest

    Re: Alert SMA-EMA CrossOver1.mq4

    Quote Originally Posted by muhammad_mulyono
    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu
    semua TF bisa... tinggal kita pandai pandai aja memanfaatkannya..

  6. #6
    admin
    Guest

    Re: Alert SMA-EMA CrossOver1.mq4

    Quote Originally Posted by muhammad_mulyono
    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu
    semua TF bisa... tinggal kita pandai pandai aja memanfaatkannya..

  7. #7

    Re: Alert SMA-EMA CrossOver1.mq4

    Quote Originally Posted by muhammad_mulyono
    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu
    kalau bisa di tf yang gede soalnya kalo ditf kecil sering ngsih false signal,mesti dibantu indi lain untuk konfirmasi

  8. #8

    Re: Alert SMA-EMA CrossOver1.mq4

    Quote Originally Posted by muhammad_mulyono
    itu indinya bgsnya di TF berapa gan...untuk analisa trend biar plofit slalu
    kalau bisa di tf yang gede soalnya kalo ditf kecil sering ngsih false signal,mesti dibantu indi lain untuk konfirmasi

  9. #9
    Wach makanya selama ini kok selalu false signal, ternyata harus makai tf yang lebih gede toh. Makasih gan infonya.










    ================================================== ======================
    Jam Tangan Casio Murah - Jam Tangan Expedition - Casio Edifice - Jam Tangan Seiko

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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