Mon compte
Déjà membre ? S'identifier
Non inscrit ? S'inscrire
 
+ Répondre à la discussion
Affichage des résultats 1 à 2 sur 2
  1. #1
    Membre lvl 5 marc01 est sur la route de la réputation...
    Date d'inscription
    January 2011
    Messages
    20
    Pouvoir de réputation
    0

    Insérer Symbole Sur Graphique Insérer Symbole Sur Graphique

    //+------------------------------------------------------------------+
    //| MTF_Heiken_Ashi[sw].mq4 |
    //| S-tf-X. |
    //| |
    //+------------------------------------------------------------------+
    #property copyright "STFX."
    #property link "S-tf-X"
    //----
    #property indicator_chart_window
    #property indicator_buffers 4
    #property indicator_color1 Red
    #property indicator_color2 Lime
    #property indicator_color3 Red
    #property indicator_color4 Lime


    extern string S1 ="Graph Reference";
    extern int TimeFrame=240;
    extern int Shift=0;
    extern string S1a ="Settings Heiken Ashi";
    extern int MaMetod =2;
    extern int MaPeriod=6;
    extern int MaMetod2 =3;
    extern int MaPeriod2=2;
    //----
    double ExtMapBuffer1[];
    double ExtMapBuffer2[];
    double ExtMapBuffer3[];
    double ExtMapBuffer4[];
    //+------------------------------------------------------------------+
    //| Custom indicator initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    //---- indicator line
    SetIndexStyle(0,DRAW_HISTOGRAM, 0, 0, Red);
    SetIndexBuffer(0, ExtMapBuffer1);
    SetIndexShift(0, Shift);
    SetIndexStyle(1,DRAW_HISTOGRAM, 0, 0, Lime);
    SetIndexBuffer(1, ExtMapBuffer2);
    SetIndexShift(1, Shift);
    SetIndexStyle(2,DRAW_HISTOGRAM, 0, 0, Red);
    SetIndexBuffer(2, ExtMapBuffer3);
    SetIndexShift(2, Shift);
    SetIndexStyle(3,DRAW_HISTOGRAM, 0, 0, Lime);
    SetIndexBuffer(3, ExtMapBuffer4);
    SetIndexShift(3, Shift);
    //---- name for DataWindow and indicator subwindow label
    switch(TimeFrame)
    {
    case 1 : string TimeFrameStr="Period_M1"; break;
    case 5 : TimeFrameStr="Period_M5"; break;
    case 15 : TimeFrameStr="Period_M15"; break;
    case 30 : TimeFrameStr="Period_M30"; break;
    case 60 : TimeFrameStr="Period_H1"; break;
    case 240 : TimeFrameStr="Period_H4"; break;
    case 1440 : TimeFrameStr="Period_D1"; break;
    case 10080 : TimeFrameStr="Period_W1"; break;
    case 43200 : TimeFrameStr="Period_MN1"; break;
    default : TimeFrameStr="Current Timeframe";
    }
    IndicatorShortName("MTF_HEikin_Ashi[sw]("+TimeFrameStr+")");
    }
    //----
    return(0);
    //+------------------------------------------------------------------+
    //| MTF_HEikin_Ashi |
    //+------------------------------------------------------------------+
    int start()
    {
    datetime TimeArray[];
    int i,limit,y=0,counted_bars=IndicatorCounted(),ExtMap Buffer1prev,ExtMapBuffer2prev;

    ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeF rame);
    //----
    limit=Bars-counted_bars;
    for(i=0,y=0;i<limit;i++)
    {
    if (Time[i]<TimeArray[y]) y++;

    ExtMapBuffer1[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,0,y);
    ExtMapBuffer2[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,1,y);
    ExtMapBuffer3[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,2,y);
    ExtMapBuffer4[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,3,y);
    ExtMapBuffer4[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,4,y);
    ExtMapBuffer4[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,5,y);
    ExtMapBuffer4[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,6,y);
    ExtMapBuffer4[i]=iCustom(NULL,TimeFrame,"Heiken_Ashi_Smoothed",MaM etod,MaPeriod,MaMetod2,MaPeriod2,7,y);
    }
    //----
    return(0);
    }
    //+------------------------------------------------------------------+
    Bonjour, J'ai repris un indicateur en y insérant l'heiken ashi .

    J'aimerais simplement savoir comment m'y prendre afin de place un Symbole sur le graphique (Flèches verte,rouge) Peut importe... lorsque le signal est donné .
    L'idéal serait même de parvenir a gommer l'heiken ashi pour ne laisser place qu'aux flèches de "Tendances" pour appeler sa comme ça.

    Merci a vous .

  2. #2
    Membre Star remjie est actif et passionnant Avatar de remjie
    Date d'inscription
    January 2011
    Localisation
    Rhone
    Messages
    279
    Pouvoir de réputation
    10

    utilise les fonctions objet:
    ObjectCreate - MQL4 Documentation
    Mieux vaut ouvrir sa gueule et passer pour un con que la fermer et ne laisser aucun doute sur le sujet.

Discussions similaires

  1. Insérer un graphique
    Par Edellion dans le forum Divers
    Réponses: 3
    Dernier message: 06/10/2010, 14h33
  2. Insérer dans un EA un indicateur programmé
    Par schematec dans le forum Programmation
    Réponses: 1
    Dernier message: 27/09/2009, 09h40
  3. Insérer un indicateur sur MetaTrader - Guide MT4
    Par Edellion dans le forum Systèmes de Trading Auto
    Réponses: 0
    Dernier message: 09/11/2008, 13h19
  4. Insérer Vidéo You Tube
    Par Edellion dans le forum Divers
    Réponses: 0
    Dernier message: 14/07/2007, 21h03

Ajouter aux Favoris | Plan du site | Archives | Forex | Contact