Mongalef Trend Filter

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #189301 quote
    KhaledKhaled
    Participant
    Veteran

    Bonjour,

    Quelqu’un aurait-il le code du Mongalef Trend Filter d’Eric Lefort? à défaut pourriez-vous svp décrire de quoi est-il composé ou quels sont les principes généraux (j’ai compris qu’il était fait à base de Repulse)?

    Merci

    #189302 quote
    NicolasNicolas
    Keymaster
    Legend

    Je crois que tu peux le trouver dans ce sujet: Bandes de mogalef

    Khaled thanked this post
    #189305 quote
    KhaledKhaled
    Participant
    Veteran

    Merci Nicolas. Je crois qu’il s’agit de deux choses différentes.

    Les Bandes de Mongalef sont décrites ici https://www.whselfinvest.com/fr-fr/plateforme-de-trading/strategies-trading-gratuites/systeme/26-mogalef-bands

    Le Mongalef Trend Filter est décrit ici https://www.mogalef-trading.com/mogalef-trend-filter

    #189550 quote
    NicolasNicolas
    Keymaster
    Legend

    Il s’agit d’un produit commercial, personne n’en connaît la formule magique, désolé 🙂

    Khaled thanked this post
    #225918 quote
    Eric LefortEric Lefort
    Participant
    New

    Bonjour,

    Non il n’y a pas de formule magique commerciale :o)

    La formule de base des bandes Mogalef est trouvable sur ce forum.

    La formule du Stop Mogalef est simple. Vous pouvez aisément l’écrire en consultant cette vidéo :
    https://www.youtube.com/watch?v=y6NHdN8vPMU

    #226065 quote
    larouedegannlarouedegann
    Participant
    Master

    express EL_MOGALEF_Bands_2023

    vars
    input $N(2,10,3),$ET(5,15,7),$coef(1,7,2),$Visualisation(“yes;No”,0);
    input $UseWhenTrading(“Yes;No”,1);
    series X,Y,MogRegLin,MogH,MogB,MogM,etyp,MogMA;
    series mh,mb,mm;
    series chgb, hh, bb,hhh,bbb;
    numeric j,SumXY,SumX2,SumY,SumX,AvgX,AvgY,b,a,SSumXY;
    series MogStopL,MogStopS,senti(50);

    calculation

    // Le programme s’exécute à la clôture de chaque barre et non à chaque tick

    if IsFirstBar() then
    begin
    CalculateAtEveryTick(false);

    end

    // Calcul du cours pondéré Mogalef exprimé en ticks:
    // Y étant un entier, on évite ainsi les risques d’erreurs dus aux arrondis

    Y = round(((h+l+o+c+c)/5/TickSize()),0);
    X = CurrentBarIndex(); // Indice de la barre

    // Calcul des paramètres a et b de la régression linéaire
    // b = Somme[(X – AvgX)(Y – AvgY)]/Somme[(X – AvgX)^2] pour les N dernières barres
    // On définit les variables numériques suivantes: SumX = somme[X], SumY = somme[Y], AvgX = moyenne[X], AvgY = moyenne[Y]
    // SumX2 = Somme[(X – AvgX)^2], SumXY = Somme[(X – AvgX)(Y – AvgY)] calculés sur les N dernières barres

    if (X <= ($N-1)) then
    begin
    SumX = SumX + X;
    SumY = SumY + Y;
    MogRegLin = close;

    // Calcul de SumX2 à la N ième barre

    if (X = ($N-1)) then
    begin
    SumX2 = $N*(Power($N,2)-1)/12; // Il s’avère que le résultat est une constante dépendant de N

    // Calcul de SumXY, a, b, MogRegLin à la N ième barre

    for j = 0 to ($N-1)
    begin
    SSumXY = SSumXY + ($N*X[j] – SumX)*($N*Y[j] – SumY);
    end
    SumXY = SSumXY/power($N,2);
    AvgX = SumX/$N;
    AvgY = SumY/$N;
    b = SumXY/SumX2;
    a = AvgY – b*AvgX;
    MogRegLin = (a + b*X)*TickSize(); //Le résultat est multilpié par la taille d’un tick
    end
    end
    else

    // Calcul de SumXY, a, b, MogRegLin après la N ième barre

    begin

    // On exploite les relations qui existent entre variables d’une barre à la suivante
    // pour éliminer les itérations et augmenter la vitesse de calcul

    SumX = SumX + X – X[$N];
    SumY = SumY + Y – Y[$N];
    SSumXY = SSumXY + ($N*X – SumX)*($N*Y – SumY)-($N*X[$N] – SumX)*($N*Y[$N] – SumY) + $N*(X – X[$N])*(Y – Y[$N]);
    SumXY = SSumXY/power($N,2);
    AvgX = SumX/$N;
    AvgY = SumY/$N;
    b = SumXY/SumX2;
    a = AvgY – b*AvgX;
    MogRegLin = (a + b*X)*TickSize();
    end

    if IsFinalBar() then
    begin

    // On est à la dernière barre et la série MogRegLin est entièrement calculée
    // On calcule la série etyp qui est l’écart type de MogRegLin
    // Sans l’instruction IsFinalBar, on calculerait autant de fois l’écart type qu’il y a de barres
    // ce qui ralentirait considérablement la plateforme

    StdDev(MogRegLin,etyp,$ET);

    // Calcul des bandes de Mogalef MogMA, MogH et MogB

    for j = CurrentBarIndex() downto 0
    begin

    // Pas de décallage si la RegLine est à l’intérieur des anciennes bandes

    If (MogRegLin[j] < MogH[j+1]) and (MogRegLin[j] > MogB[j+1]) then
    begin
    MogH[j] = MogH[j+1];
    MogB[j] = MogB[j+1];
    MogM[j] = MogM[j+1];
    MogMA[j] = MogMA[j+1];
    MogStopS[j] = MogStopS[j+1];
    MogStopL[j] = MogStopL[j+1];
    end
    else

    // Si décallage tracé des nouvelles bandes

    begin
    MogH[j] = (MogRegLin[j] + (etyp[j]*$Coef));
    MogB[j] = (MogRegLin[j] – (etyp[j]*$Coef));
    MogM[j] = MogRegLin[j];
    MogMA[j] = MogM[j+1];

    end
    mh[j]=void;
    mb[j]=void;
    mm[j]=void;

    if $UseWhenTrading=0 then begin
    //********************************************************
    // INTERPRETATION // Must be modified, this is an exemple.
    //if (h|j] >= MogH[j]) and (MogH[j] > MogH[j+1]) then senti[j] = 100;
    if ((l[j] <= MogB[j]) and (MogH[j] = MogH[j+1])) then senti[j] = 100;

    //********************************************************
    end

    if $Visualisation=0 then begin
    mh[j]=MogH[j];
    mb[j]=mogB[j];
    mm[j]=MogM[j];
    end

    end
    end

     

    interpretation
    begin
    sentiment=50;
    sentiment=senti;
    senti=100*senti;
    end

    plotband (MH,”darkgreen”,2,MM,”blue”,1,”lightgreen”);
    plotband (MM,”Blue”,1,MB,”darkred”,2,”lightred”);//@@@cs:1454737-4050339-1178231_cs@@@

    #226067 quote
    larouedegannlarouedegann
    Participant
    Master

    RETRACEMENT 90

    haut = highest[90](high)
    bas = lowest[90](low)
    RET90 = (haut+bas)/2
    return ret90
    #226192 quote
    maxlysmaxlys
    Participant
    Senior

    Bonjour,

    Concernant le nouveau code des bandes de MOGALEF qu’a posté @larouedegann ci dessus, est-il possible d’avoir un mise à jour du code trouvé ici https://www.prorealcode.com/topic/mogalef-bands-et-mogalef-bands-stop-nano-trader/  , si ce code n’est plus d’actualité avec les modifications.

    Merci

    #243799 quote
    MadrosatMadrosat
    Participant
    Master

    Mogalef bullish  breakout

    indicateur  d’Eric maintenant libre

    Ivan est ce  une traduction dans tes possibilités:

    Express EL_Bullish_Breakout2

    Vars
    input $StartTime(0,2359,0),$EndTime(0,2359,2359);
    input $SendEmail(0,1,0),$PlaySound(0,1,0),$MessageBox(0,1,0);
    input $Smooth(1,5,1); // importance des hauts et des bas
    input $Mini(3,30,4); // Dernier haut et dernier bas doivent etre dÈtectÈs au-dessus de cette limite
    input $Maxi(5,60,19); // Longueur maxi de tracÈ
    input $Prolong(3,20,10); // Longueur maxi du tracÈ de la prolongation une fois dÈtectÈ et tracÈ.
    // ET empeche nouveau tracÈ tant que >0.
    input $MaxHighInclination(0,500,500); // Pente maxi de la rÈsistance
    input $MinHighInclination(0,500,0);

    input $EntryStrategy(0,2,1);//DÈtermine la stratÈgie d’entrÈe.
    //0=pas d’entrÈe, 1=EntrÈe si cassure en clÙture , 2=EntrÈe en clÙture si cassure en cours de bougie
    input $DifferEntry(0,5,0); // diffËre l’entrÈe de x bougies par rapport au signal

     

    series Hautdansmini,Hautdansmaxi; //,Basdansmini,Basdansmaxi;
    Series HDMA;

    Numeric Haut;
    series x,y; //,xx,yy;
    Series CBI;
    Series H1,H2,H3,H4,H5,CBIH1,CBIH2,CBIH3,CBIH4,CBIH5;

    Series ZH;
    Series ZHtemp; //ZBtemp;
    series ZHsuite; //ZBsuite,
    Numeric aH,bH; //,aB,bB;
    Numeric Hlongueur; //,Blongueur;

    Numeric zz;
    Series TracerSuite;
    Series bHsuite; //,bBsuite;

    Numeric a;
    Numeric b;
    Numeric i,j;

    Series EntreeLong; //,Entreecourt;
    Numeric bHStop,ZHStop; //,ZBStop,bBStop;

    Calculation

    // Le programme s’exÈcute ‡ la clÙture de chaque barre et non ‡ chaque tick
    if IsFirstBar() then
    begin
    CalculateAtEveryTick(false);
    end

    // Ici on optimise la charge processeur
    CBI= CurrentBarIndex();
    if Isfinalbar() and isbarcompleted() then
    begin
    for j=1 to CurrentBarIndex() begin

    Hautdansmini[j]= Highest(h,$Mini);
    y[j]= (IndexOfHighest(h,$Mini)-CBI[j]);
    HDMA[j]= Highest(h,($Maxi – $Mini));
    x[j]= (IndexOfHighest(h,$Mini)-CBI[j]);
    Hautdansmaxi[j]= HDMA[j+$Mini];
    end
    end
    // fin optim

    haut=0;
    if $smooth=1 and isbarcompleted() then begin
    if ((h<h[1]) and (h[1]>h[2])) or ( (h<h[1]) and (h[1]>=h[2]) and (h[2]>h[3]) ) then haut=1;
    end
    else begin
    if ( ($Smooth=2) and (h<h[2]) and (h[1]<h[2]) and (h[3]<=h[2]) and (h[2]>h[4]) ) then haut=2;
    if ( ($Smooth=3) and (h<h[3]) and (h[1]<h[3]) and (h[2]<=h[3]) and (h[3]>=h[4]) and (h[3]>=h[5]) and (h[3]>=h[6]) ) then haut=3;
    end

    if ( haut>0 ) then begin
    H5=H4[1];
    CBIH5=CBIH4[1];
    H4=H3[1];
    CBIH4=CBIH3[1];
    H3=H2[1];
    CBIH3=CBIH2[1];
    H2=H1[1];
    CBIH2=CBIH1[1];
    H1=h[$smooth];
    CBIH1=CBI[$smooth];
    end
    else begin //sinon on garde les anciennes valeurs et distances
    H5=H5[1];
    CBIH5=CBIH5[1];
    H4=H4[1];
    CBIH4=CBIH4[1];
    H3=H3[1];
    CBIH3=CBIH3[1];
    H2=H2[1];
    CBIH2=CBIH2[1];
    H1=H1[1];
    CBIH1=CBIH1[1];
    end

    // si on vient de tracer un haut
    // on recherche si dernier haut dans la limite de mini et ÈcartÈ de $mini du prÈcÈdent
    if( (CBI-CBIH1 <($Mini*$Smooth)) and ( ((CBI-CBIH1)=$Smooth) ) and (CBI>$Mini*$Smooth)
    and (Tracersuite[1]=0) and (ZH[$Mini +1] =void) ) then begin
    //———–CritËres gÈnÈraux d’environnement pour le tracÈ—————————- A

    // Si c’est un haut qui vient de se tracer
    if((CBI-CBIH1)=$Smooth) and (TracerSuite[1]=0) then begin // Si c’est un haut qui vient de se tracer //——————————————————- Ba
    a=1; // On met a ‡ 1 pour prÈparer le test de validation de la droite de rÈsistance. Il sera mis ‡ 0 si une rÈsistance est trouvÈe.

    if( (H2>=H1) and ((CBIH1-CBIH2)>=($Mini-$Smooth)) and ((CBIH1-CBIH2+$Smooth)<=$Maxi) ) then begin // calcul de tracÈ de ligne des hauts entre H2 et H1 si H2>H1 ———– C
    bH=( (H2-H1) / (CBIH1-CBIH2) );
    aH=H1;
    for i= 0 to (CBI-CBIH2+$Smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$Smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    a=0;
    for i= 0 to (CBI-CBIH2+$Smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    a=1;
    end
    end
    // validation de la pente
    if ( ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) ) then begin
    a=1;
    end
    // validation ou invalidation de la droite
    If(a=1) then begin
    for i= 0 to (CBI-CBIH2+$Smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (a=0) then begin
    Hlongueur= ((CBI-CBIH2+$Smooth)); //si c’est bon, on stocke la longueur du haut tracÈ.
    zz=1;
    end
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end // end de C
    else begin // si on a pas validÈ H2->H1 on voit si H3>H1 ————————————————————- C
    if( (H3>=H1) and (a=1) and ((CBIH1-CBIH3)>($Mini-$smooth)) and ((CBIH1-CBIH3+$Smooth)<=$Maxi) ) then begin // si on a pas validÈ H2->H1 on voit si H3>H1 ———————D
    bH=( (H3-H1) / (CBIH1-CBIH3) );
    aH=H1;
    for i= 0 to (CBI-CBIH3+$Smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$Smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    a=0;
    for i= 0 to (CBI-CBIH3+$Smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    a=1;
    end
    end
    // validation de la pente
    //note 2014-02-08 : si a=0 il est encore utile de tester la droite, mais si a=1 elle est invalidÈe.
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    a=1;
    end
    // validation ou invalidation de la droite
    If(a=1) then begin
    for i= 0 to (CBI-CBIH3+$Smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (a=0) then begin
    Hlongueur= ((CBI-CBIH3+$smooth)); //si c’est bon, on stocke la longueur du haut tracÈ.
    zz=1;
    end
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end //————————————————- D
    else begin //si on n’a pas validÈ H3->H1 on voit H1->H4 ————————————————- D

    if( (H4>=H1) and (a=1) and ((CBIH1-CBIH4)>($Mini-$smooth)) and ((CBIH1-CBIH4+$smooth)<=$Maxi) ) then begin // si on a pas validÈ H3->H1 on voit si H4>H1 ———————E
    //H3=9240;
    bH=( (H4-H1) / (CBIH1-CBIH4) );
    aH=H1;
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    a=0;
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    a=1;
    end
    end
    // validation de la pente
    if ( ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) ) then begin
    a=1;
    end
    // validation ou invalidation de la droite
    If(a=1) then begin
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (a=0) then begin
    Hlongueur= ((CBI-CBIH4+$smooth)); //si c’est bon, on stocke la longueur du haut tracÈ.
    zz=1;
    end
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end //————————————————- E

    else begin //si on n’a pas validÈ H4->H1 on voit H2->H3 ——–E
    if( (H3>=H2) and (a=1) and ((CBI-CBIH3)>($Mini))and ((CBIH1-CBIH3+$smooth)<=$Maxi) ) then begin // si on a pas validÈ H4->H1 on voit si H3>H2 ———————F
    bH=( (H3-H2) / (CBIH2-CBIH3) );
    aH=H2;
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    a=0;
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    a=1;
    end
    end
    // validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    a=1;
    end
    // validation ou invalidation de la droite
    If(a=1) then begin
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (a=0) then begin
    Hlongueur= ((CBI-CBIH3+$smooth)); //si c’est bon, on stocke la longueur du haut tracÈ.
    zz=1;
    end
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end //————————————————- F

    else begin //si on n’a pas validÈ H2->H3 on voit H2->H4 ——-F
    if( (H4>=H2) and (a=1) and ((CBI-CBIH4)>($Mini)) and ((CBIH1-CBIH4+$smooth)<=$Maxi) ) then begin // si on a pas validÈ H2->H3 on voit si H2>H4 ———————G
    bH=( (H4-H2) / (CBIH2-CBIH4) );
    aH=H2;
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    a=0;
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    a=1;
    end
    end
    // validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    a=1;
    end
    // validation ou invalidation de la droite
    If (a=1) then begin //si a=1 alors on efface les ZHtemp (invalide)
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (a=0) then begin
    Hlongueur= ((CBI-CBIH4+$smooth)); //si c’est bon, on stocke la longueur du haut tracÈ.
    zz=1;
    end
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end //————————————————- FIN G

    end //—————————————————————- FIN F
    end //—————————————————————— FIN E
    end //——————————————————————–FIN D
    end

    if(zz=1) then begin // si un tracÈ a ÈtÈ stockÈ
    b=1;
    if( (H2>=H1) ) then begin // si H2>=H1 ———– C2
    bH=( (H2-H1) / (CBIH1-CBIH2) ); // mais t
    aH=H1; //-((CBIB1-CBIH1)*bH );

    for i= 0 to (CBI-CBIH2+$smooth) //
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    b=0;
    for i= 0 to (CBI-CBIH2+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    b=1;
    end
    end
    // Validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin // …………………………………………BISEAU DESCENDANT : ICI !
    b=1;
    end
    // validation ou invalidation de la droite
    If(b=1) then begin
    for i= 0 to (CBI-CBIH2+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (b=0) then begin
    zz=zz+1;
    Hlongueur= (CBI-CBIH2+$smooth);
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end

    end //———————————————————————–

    if( (H3>=H1) and (b=1) and ((CBIH1-CBIH3)>=($Mini/3)) ) then begin // ———-
    bH=( (H3-H1) / (CBIH1-CBIH3) );
    aH=H1; //-((CBIB1-CBIH1)*bH );
    for i= (0) to ((CBI-CBIH3)+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    b=0;
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    if ( (ZHtemp[i]<h[i]) ) then begin
    b=1;
    end
    end
    // Validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    b=1;
    end
    // validation ou invalidation de la droite
    If(b=1) then begin
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (b=0) then begin
    zz=zz+1;
    Hlongueur= (CBI-CBIH3+$smooth);
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end
    end

    if( (H4>=H1) and (b=1) and ((CBIH1-CBIH4)>=($Mini/2)) ) then begin // Si pas de ligne, on cherche entre H1 et H4 —- E2

    bH=( (H4-H1) / (CBIH1-CBIH4) );
    aH=H1;//-((CBIB1-CBIH1)*bH );
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth); // a + bx
    end
    // vÈrification qu’aucun haut ne dÈpasse
    b=0;
    for i= 0 to (CBI-CBIH4+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    b=1;
    end
    // Validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    b=1;
    end
    // validation ou invalidation de la droite
    If(b=1) then begin
    for i= 0 to (CBI-CBIH4+$smooth)
    ZHtemp[i]=void;
    end
    end
    if (b=0) then begin
    zz=zz+1;
    Hlongueur= (CBI-CBIH4+$smooth);
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end

    end //————————————————————–

     

    if( (H3>=H2) and (b=1) ) then begin
    bH=( (H3-H2) / (CBIH2-CBIH3) ); //coefdir
    aH=H2; //-((CBIB1-CBIH2)*bH ); // ATTENTION : le niveau de prix doit etre ici LA DROITE CALCULEE A LA FIN
    for i= (0) to ((CBI-CBIH3)+$smooth)
    begin
    ZHtemp[i]=aH + bH*(i-$smooth);
    end
    // vÈrification qu’aucun haut ne dÈpasse
    b=0;
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    if (ZHtemp[i]<h[i]) then begin
    b=1;
    end
    end
    // Validation de la pente
    if ( (((bH*100000)/c)>=$MaxHighInclination) or (((bH*100000)/c)<$MinHighInclination) ) then begin
    b=1;
    end
    // validation ou invalidation de la droite
    If(b=1) then begin
    for i= 0 to (CBI-CBIH3+$smooth)
    begin
    ZHtemp[i]=void;
    end
    end
    if (b=0) then begin
    zz=zz+1;
    Hlongueur= (CBI-CBIH3+$smooth);
    ZHtemp=void; // remise ‡ “rien” de ZHtemp aprËs traÁage sur les barres prÈcÈdentes.
    end

    end //—————————————————————-

     

    If (zz=2) then begin

    For i= 0 to Hlongueur
    begin
    ZH[i]=ZHtemp[i];
    end
    TracerSuite[1]=$Prolong+1;
    bHSuite=bH;
    end
    end
    end
    end
    else begin
    end
    //

    if (TracerSuite[1]<($Prolong+1)) and (TracerSuite[1]>0) then begin
    bHSuite=bHsuite[1];
    ZHsuite=ZHsuite[1]-bHsuite;
    TracerSuite=TracerSuite[1]-1;
    end
    If TracerSuite[1]=($Prolong+1) then begin
    ZHsuite=ZH[1]-bHSuite;
    bHSuite=bH;
    TracerSuite=TracerSuite[1]-1;
    bHStop=bH;
    ZHStop=ZHsuite;
    // if $Sound=1 then PlaySound(“E-BiseauEnFormation”);
    end
    if (Tracersuite=0) then begin
    ZHsuite=void;
    end

    if ($EntryStrategy=1) then begin
    if (c>ZHsuite) and ((c[1]<=ZHsuite[1]) or ( (ZHsuite[1]=void) and (ZHsuite<>void) ) )
    and ( ((bHsuite*100000)/c)<=$MaxHighInclination) then begin //
    EntreeLong=1;
    end
    end

    if ($EntryStrategy=2) then begin
    if (h>ZHsuite) and ((h[1]<=ZHsuite[1]) or ( (ZHsuite[1]=void) and (ZHsuite<>void) ) )
    and ( ((bHsuite*100000)/c)<=$MaxHighInclination) then begin
    EntreeLong=1;
    end
    end

    zz=0;
    ZH=void;

    Interpretation
    begin
    if (TimeToNumeric(timeopen) >= $StartTime) and (TimeToNumeric(timeopen) <= $EndTime) then begin
    if ((EntreeLong[$DifferEntry]=1) and (IsBarCompleted())) then begin
    sentiment = 100;
    if ($SendEmail = 1) then SendEmail(“Buy signal”,”Buy signal: ” + SymbolName());
    if ($PlaySound = 1) then Playsound(“ring”);
    if ($MessageBox = 1) then MessageBox(“Buy signal: ” + SymbolName());
    end
    end
    end

    plot (ZH,black,3);
    plot (ZHsuite,green,2);
    //plot (H3,black,1);
    //plot (H1,green,1);//@@@cs:6747875-6762255-5883016_cs@@@

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Mongalef Trend Filter


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Khaled @khaled Participant
Summary

This topic contains 8 replies,
has 6 voices, and was last updated by MadrosatMadrosat
1 year, 7 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/04/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...