Wolfe waves indicator

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #125177 quote
    stefou102
    Participant
    Veteran

    Hello,

    It has been some time since I haven’t been around the forum, as I’m developing my own trade manager in Python. The goal is to trade manually, but let the risk management and the follow up of the trade to the trade manager (best way to earn money on market in my opinion). For people interested, I may commercialize it soon…Anyway, back to prt code.

    As I don’t really use it, and I think a lot of people look at it, here is my code of the wolves wave…For people good with coding, I think my code embed some really interesting parts that can be reused. Given complexity of the code, some bugs may remain.Feel free to try to improve it also. I can help also explain the logic if there are some interests…

    defparam calculateonlastbars=5000
    defparam drawonlastbaronly=false
    ONCE coefATR=1.5
    ONCE Period=10
    pinshow=0
    showline=1
    RcolorBuy=0
    GcolorBuy=255
    BcolorBuy=10
    RcolorSell=255
    GcolorSell=0
    BcolorSell=0
    
    //detection UT
    
    once NbBar = 1
    if openyear<>openyear[1] and openyear[1]<>openyear[2] then
    Mybarminutes=15000
    elsif openmonth-openmonth[1]=3 or openmonth-openmonth[1]=-9 then
    Mybarminutes=11000
    elsif openmonth<>openmonth[1] and openmonth[1]<>openmonth[2] then
    Mybarminutes=10000
    elsif openday-openday[1]=7 or openday-openday[1]=-21 or openday-openday[1]=-22 or openday-openday[1]=-23 or openday-openday[1]=-24 then
    Mybarminutes=9000
    elsif openday<>openday[1] and openday[1]<>openday[2] then
    Mybarminutes=8000
    elsif BarIndex < NbBar+2 then
    MyDay=day
    dayminutes = 1440*(MyDay-MyDay[1])
    MyHour=hour
    hourminutes = 60*(MyHour-MyHour[1])
    MyMin=minute
    barminutes = MyMin - MyMin[1] + hourminutes + dayminutes
    barminutes=abs(barminutes)
    Mybarminutes = lowest[NbBar](barminutes)[1]
    endif
    
    if Mybarminutes<>0 and Mybarminutes<10 then
    RRatr=5
    elsif Mybarminutes<>0 and Mybarminutes<60 then
    RRatr=3.5
    else
    RRatr=2.5
    endif
    
    
    //1. on utilise des MM pour trouver les points hauts/bas
    ATR=averagetruerange[14](close)
    //Period=10
    DataF = Close
    lagF = ROUND((Period-1)/2)
    dF = (DataF+(DataF-DataF[lagF]))
    LMA = exponentialaverage[period](dF)
    
     
    //Smoothed curve of zero lag Moving Average
    IF BARINDEX > period THEN
    smoothLMA=weightedaverage[period](LMA)
    ELSE
    smoothLMA=undefined
    ENDIF
    if minbar=0 then
    minbar=barindex
    endif
    if maxbar=0 then
    maxbar=barindex
    endif
    
    IF BARINDEX > PERIOD THEN //For avoid computer errors
    bullcross=LMA crosses over smoothLMA
    bearcross=LMA crosses under smoothLMA
    ENDIF
    //2. chaque fois qu'il y a un croisement de MM, on stocke le point extrème précédent et sa position, et on trouve le dernier point extrème
    If bearcross then
    
    
    //on prend le dernier plus bas
    lastmaxtemp=high[1]
    maxbartemp=barindex[1]
    
    for i=0 to barindex-minbar-1 do
    if high[i]>=lastmaxtemp then
    lastmaxtemp=high[i]
    maxbartemp=barindex[i]
    endif
    next
    //on verifie qu'il y a assez d'ampli entre le plus haut récent et le précédent plus bas, sinon on prend pas en compte.
    If lastmaxtemp-lastmin>ATR*CoefATR then
    //Si on a skippé un plus bas car pas assez d'ampli, on se retrouve donc avec 2 plus hauts. Si le plus récent est le plus haut, on essaye d'oublier le précédent plus haut. Si le précédent était plus haut, on ne prend pas en compte le dernier
    if barindex-maxbar<barindex-minbar then
    
    if lastmaxtemp>lastmax then
    
    lastmax=lastmaxtemp
    maxbar=maxbartemp
    endif
    //si on est dans le cas normal d'un plus bas suivit d'un plus haut, alors on sauve les derniers plus hauts
    else
    //prevlastmax2=prevlastmax
    //prevmaxbar2=prevmaxbar
    prevlastmax=lastmax
    prevmaxbar=maxbar
    
    lastmax=lastmaxtemp
    maxbar=maxbartemp
    
    endif
    endif
    
    //test=prevlastmax2
    //drawtext("#test#",barindex,low-20,SansSerif,Bold,10) coloured (0,0,10)
    
    endif
    
    
    If bullcross then
    
    
    //on prend le dernier plus bas
    lastmintemp=low[1]
    minbartemp=barindex[1]
    
    for i=0 to barindex-maxbar-1 do
    if low[i]=<lastmintemp then
    lastmintemp=low[i]
    minbartemp=barindex[i]
    endif
    next
    
    
    If lastmax-lastmintemp>ATR*CoefATR then
    if barindex-minbar<barindex-maxbar then
    
    if lastmintemp<lastmin then
    lastmin=lastmintemp
    minbar=minbartemp
    endif
    
    else
    //prevlastmin2=prevlastmin
    //prevminbar2=prevminbar
    prevlastmin=lastmin
    prevminbar=minbar
    
    lastmin=lastmintemp
    minbar=minbartemp
    
    endif
    endif
    
    
    endif
    
    if pinshow then
    DRAWTEXT("▼",prevmaxbar,prevlastmax,Dialog,Bold,12) coloured(255,0,0)
    endif
    
    if pinshow then
    DRAWTEXT("▲",prevminbar,prevlastmin,Dialog,Bold,12) coloured(0,255,10)
    endif
    //3. Si on a une loi de Dow (2 plus bas montent, 2 plus hauts montent) et qu'on a un peu de vol entre les points, on peut tracer des obliques
    //neutre=1
    
    if lastmax>prevlastmax and lastmin>prevlastmin and prevlastmin<>0 and prevlastmax<>0 and prevlastmax>lastmin and ((abs(Lastmax-Lastmin)+abs(Prevlastmax-PrevLastmin))/2)>ATR*CoefATR and prevminbar>prevmaxbar and minbar>maxbar and lastmin<(lastmax-(lastmax-prevlastmin)*0.37) and short=0 and long=0 and lastmax>(prevlastmax-prevlastmin)*1.22+prevlastmin then
    bull=-1
    
    endif
    
    if lastmin<prevlastmin and lastmax<prevlastmax  and prevlastmax<>0 and prevlastmin<>0  and prevlastmin<lastmax and ((abs(Lastmax-Lastmin)+abs(Prevlastmax-PrevLastmin))/2)>ATR*CoefATR and prevmaxbar>prevminbar and maxbar>minbar and lastmax>(lastmin+(prevlastmax-lastmin)*0.37) and long=0 and short=0 and lastmin<prevlastmax-(prevlastmax-prevlastmin)*1.22 then
    bull=1
    endif
    //test=lastmin<prevlastmin and lastmax<prevlastmax  and prevlastmax<>0 and prevlastmin<>0  and prevlastmin<lastmax
    //
    //drawtext("#test#",barindex,high+ATR/5,SansSerif,Bold,10) coloured (0,0,10)
    //test=lastmin
    //drawtext("#test#",barindex,low-ATR,SansSerif,Bold,10) coloured (255,0,10)
    
    if bull[1]=0 and bull=1 then
    
    W1upbar=prevminbar
    W1up=prevlastmin
    W2upbar=prevmaxbar
    W2up=prevlastmax
    W3upbar=minbar
    W3up=lastmin
    W4up=lastmax
    W4upbar=maxbar
    
    
    endif
    
    
    
    if bull[1]=0 and bull=-1 then
    
    W1dnbar=prevmaxbar
    W1dn=prevlastmax
    W2dnbar=prevminbar
    W2dn=prevlastmin
    W3dn=lastmax
    W3dnbar=maxbar
    
    W4dnbar=minbar
    W4dn=lastmin
    
    endif
    
    //if bull=1 then
    
    //endif
    
    //Angle13=low crosses under W3up
    //drawtext("#Angle13#",barindex,high,SansSerif,Bold,16) coloured (0,255,10)
    //si on a 4 vagues et qu'on dépasse le point 4, on trace les éléments graphiques
    if bull=1 and ((low<W3up-ATR*0.75 and low[1]>W3up-ATR*0.75) or (low<W3up-ATR and bull[1]=0)) and wolve=0 then
    
    
    Angle13=tan(((W1up-W3up)/W1up*100)/(W3upbar-W1upbar))
    Angle24=tan(((W4up-W2up)/W2up*100)/(W4upbar-W2upbar))
    AngleTP3=tan(((W4up-W1up)/W1up*100)/(W4upbar-W1upbar))
    //test=(W1up-W3up)/ATR/(W3upbar-W1upbar)
    //drawtext("#test#",barindex,low,SansSerif,Bold,10) coloured (0,0,10)
    if showline then
    drawsegment(W1upbar,W1up,barindex,W3up-(((barindex-W3upbar)*Atan(Angle13))/100*W3up)) coloured(0,0,0)
    endif
    
    drawtext("1",W1upbar,W1up-ATR/2,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("2",W2upbar,W2up+ATR/2,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("3",W3upbar,W3up-ATR/2,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("4",W4upbar,W4up+ATR/2,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    wolve=1
    
    endif
    
    If bull=-1 and ((high>W3dn+ATR*0.75 and high[1]<W3dn+ATR*0.75) or (high>W3dn+ATR and bull[1]=0)) and wolve=0 then
    
    
    
    Angle13=tan(((W3dn-W1dn)/W1dn*100)/(W3dnbar-W1dnbar))
    Angle24=tan(((W4dn-W2dn)/W2dn*100)/(W4dnbar-W2dnbar))
    AngleTP3=tan(((W1dn-W4dn)/W1dn*100)/(W4dnbar-W1dnbar))
    //test=(W1up-W3up)/ATR/(W3upbar-W1upbar)
    //drawtext("#test#",barindex,low,SansSerif,Bold,10) coloured (0,0,10)
    //test=Angle13
    //drawtext("#test#",barindex,high+ATR/5,SansSerif,Bold,10) coloured (0,0,10)
    if showline then
    drawsegment(W1dnbar,W1dn,barindex,W3dn+(((barindex-W3dnbar)*Atan(Angle13))/100*W3dn)) coloured(0,0,0)
    //drawsegment(W2dnbar,W2dn,barindex,W4dn+(((barindex-W4dnbar)*Atan(Angle24))/100*W4dn)) coloured(0,0,0)
    //test=angle13
    //drawtext("#test#",barindex,low,SansSerif,Bold,10) coloured (0,0,10)
    endif
    
    drawtext("1",W1dnbar,W1dn+ATR/2,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("2",W2dnbar,W2dn-ATR/2,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("3",W3dnbar,W3dn+ATR/2,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("4",W4dnbar,W4dn-ATR/2,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    wolve=-1
    
    endif
    
    //test=barindex
    //drawtext("#test#",barindex,low,SansSerif,Bold,10) coloured (0,0,10)
    
    
    /////////////////////////// Heiken Ashi SIGNAL for WAVE 5
    
    //Activer les trades sur signal ou pas (si les cassures n'ont pas marché avant)
    signalHA=0
    
    //appelle au Half trend 2 pour Buy/sell level
    ampliHT=2
    once lowpricei2 = 0
    once highpricei2 = 0
    once lowma2 = 0
    once highma2 = 0
    
    if barindex>1 then
    aclose=(open+close+low+high)/4
    aopen=(aopen[1]+aclose[1])/2
    xHigh = Max(aOpen, aClose)
    xLow = Min(aOpen, aClose)
    ahigh = Max(High,xHigh)
    alow = Min(Low,xLow)
    endif
    
    
    amplitude2=ampliHT
    lowpricei2 = Lowest[Amplitude2](alow)
    highpricei2 = Highest[Amplitude2](ahigh)
    lowma2 = average[Amplitude2](alow)
    highma2 = average[Amplitude2](ahigh)
    
    if barindex>Amplitude2 then
    if(nexttrend2=1) then
    maxlowprice2=Max(lowpricei2,maxlowprice2)
    
    if(highma2<maxlowprice2 and Close<Low[1]) then
    trend2=1.0
    nexttrend2=0
    minhighprice2=highpricei2
    endif
    endif
    if(nexttrend2=0) then
    minhighprice2=Min(highpricei2,minhighprice2)
    if(lowma2>minhighprice2 and Close>High[1]) then
    trend2=0.0
    nexttrend2=1
    maxlowprice2=lowpricei2
    endif
    endif
    if(trend2=0.0) then
    if(trend2[1]<>0.0) then
    up2=down2[1]
    else
    up2=Max(maxlowprice2,up2[1])
    endif
    down2=0.0
    else
    if(trend2[1]<>1.0) then
    down2=up2[1]
    else
    down2=Min(minhighprice2,down2[1])
    endif
    up2=0.0
    endif
    endif
    
    halftrend2=undefined
    if up2>0 then
    halftrend2 = up2
    elsif down2>0 then
    halftrend2 = down2
    endif
    
    /////////////////////////// Heiken Ashi Current TF
    IF BarIndex>0 THEN
    xClose = (open+high+low+close)/4
    xOpen = (xOpen[1]+xClose[1])/2
    xHigh = max(High,max(xOpen,xClose))
    xLow = min(Low,min(xOpen,xClose))
    ELSE
    xClose = (open+high+low+close)/4
    xOpen = open
    xHigh = max(High,max(xOpen,xClose))
    xLow = min(Low,min(xOpen,xClose))
    
    endif
    FiltreZoneHL=1
    if FiltreZoneHL then
    RRup=abs(low-lowest[10](low))<ATR2*1.5
    RRdn=abs(high-highest[10](high))<ATR2*1.5
    else
    RRUP=1
    RRDn=1
    endif
    
    CrossUp=close>halftrend2
    CrossDn=close<halftrend2
    SignalHASmoothed=1
    LimSurAchatVente=180
    If SignalHASmoothed then
    dist=AverageTrueRange[50](close)*0.8//15 //distance MA50
    ma7=average[7]
    ma20=average[20]
    ma50=average[50]
     
    Up1=ma7<ma50 and ma7<ma20 and ma50-open>dist*pointsize
    Dn1=ma7>ma50 and ma7>ma20 and open-ma50>dist*pointsize
    //--External parameters
    Smoother=5
    
    ys1 = ( high + low + close * 2 ) / 4
    rk3 = exponentialaverage[Smoother](ys1)
    
    rk4 = std[Smoother](ys1)
    if rk4<>0 then
    rk5 = (ys1 - rk3 ) * 200 / rk4
    rk6 = exponentialaverage[Smoother](rk5)
    up = exponentialaverage[Smoother](rk6)
    down = exponentialaverage[Smoother](up)
    endif
    
    //--Overbought/Oversold/Warning Detail
    UPshape = up > LimSurAchatVente and up>down
    DOWNshape = down < -LimSurAchatVente and up<down
     
    HAD= upshape or upshape[1] or upshape[2]  or upshape[3]  or Dn1
    HAU= downshape or downshape[1] or downshape[2] or downshape[3] or Up1
    
    else
    HAU=1
    HAD=1
    endif
    
    HAUp2= xClose-xOpen>0
    HADn2= xClose-xOpen<0
    
    ///////////////////////////
    ATR2=averagetruerange[20](close)
    RatioBougie= abs(xOpen - xClose)
    
    DojiHA= 1//RatioBougie<=ATR2/3 or RatioBougie[1]<=ATR2/3
    
    HADecroit= summation[3](RatioBougie <RatioBougie[1])>0
    
    ////////////////////////////////
    if HAup2 and DojiHA and HADecroit and HAU and RRUP then
    signalup=1
    else
    signalup=0
    endif
    
    if HADn2 and DojiHA and HADecroit and HAD and RRDn then
    signaldn=1
    else
    signaldn=0
    endif
    
    
    
    
    if trendbreak=1 and ENTRYbar<>0 and wolve=1 then
    if close<trendbreakprice then
    trendbreak=0
    endif
    endif
    
    if trendbreak=1 and ENTRYbar<>0 and wolve=-1 then
    
    if close>trendbreakprice then
    trendbreak=0
    endif
    endif
    //test=wolve
    //drawtext("#test#",barindex,high+ATR,SansSerif,Bold,10) coloured (255,0,10)
    if wolve=1 and trendbreak=0 then
    //si les prix cassent l'oblique 1-3 par le bas puis cloture audessus, que la bougie soit verte et que le TP1 ne soit pas déjà atteint et que le RR avec le stop soit bon
    //test=close[1]<W3up+(((barindex[1]-W3upbar)*Atan(Angle24))/100*W3up)-ATR/5 and high>W3up+(((barindex-W3upbar)*Atan(Angle24))/100*W3up)+ATR/5
    //drawtext("#test#",barindex,high+ATR,SansSerif,Bold,10) coloured (255,0,10)
    
    
    if low[1]<W3up-(((barindex[1]-W3upbar)*Atan(Angle13))/100*W3up)+ATR/5 and close>W3up-(((barindex-W3upbar)*Atan(Angle13))/100*W3up)+ATR/5 and long[1]=0 and close<W1up-ATR then
    
    SL=lowest[8](low)-ATR
    trendbreak=1
    ENTRY=high+ATR/5
    ENTRYbar=barindex
    trendbreakprice=low-ATR/5
    //si les prix cassent l'oblique 2-4 reportée sur le point 3, puis cloture au dessus, que la bougie soit verte et que le TP1 ne soit pas déjà atteint et que le RR avec le stop soit bon
    elsif low[1]<W3up+(((barindex[1]-W3upbar)*Atan(Angle24))/100*W3up)-ATR/5 and close>W3up+(((barindex-W3upbar)*Atan(Angle24))/100*W3up)+ATR/5 and long[1]=0 and close<W1up-ATR then
    
    SL=lowest[8](low)-ATR
    trendbreak=1
    ENTRY=high+ATR/5
    ENTRYbar=barindex
    trendbreakprice=low-ATR/5
    //si les prix cassent l'oblique 2-4, puis cloture au dessus, que la bougie soit verte et que le RR avec le stop soit bon
    elsif open[1]<W4up+(((barindex[1]-W4upbar)*Atan(Angle24))/100*W4up) and close>W4up+(((barindex-W4upbar)*Atan(Angle24))/100*W4up)+ATR/5 and long[1]=0 and high<min(W1up,W4up)-ATR then
    
    SL=lowest[8](low)-ATR
    trendbreak=1
    ENTRY=high+ATR/5
    ENTRYbar=barindex
    trendbreakprice=low-ATR/5
    //si on a eu un signal achat, que le stop n'est pas trop loin et que l'entrée n'est pas déjà au dessus de la vague 3 ou du TP1
    elsif (signalup=1 or signalup[1]=1) and CrossUp and long[1]=0 and halftrend2-lowest[8](low)<RRatr*ATR*ATR and halftrend2<W3up and halftrend2<W1up and signalHA=1 then
    SL=lowest[8](low)-ATR
    trendbreak=1
    ENTRY=max(open,halftrend2+ATR/5)
    ENTRYbar=barindex
    trendbreakprice=low-ATR/5
    //else
    //trendbreak=0
    endif
    
    
    
    endif
    
    
    if wolve=-1 and trendbreak=0 then
    
    //test=high[1]>W3dn+(((barindex[1]-W3dnbar)*Atan(Angle13))/100*W3dn)+ATR/5 and low<W3dn+(((barindex-W3dnbar)*Atan(Angle13))/100*W3dn)-ATR/5
    //drawtext("#test#",barindex,high+ATR,SansSerif,Bold,10) coloured (255,0,10)
    
    if high[1]>W3dn+(((barindex[1]-W3dnbar)*Atan(Angle13))/100*W3dn)+ATR/5 and close<W3dn+(((barindex-W3dnbar)*Atan(Angle13))/100*W3dn)-ATR/5 and short[1]=0 and close>W1dn+ATR then
    
    SL=highest[8](high)+ATR
    trendbreak=1
    ENTRY=low-ATR/5
    ENTRYbar=barindex
    trendbreakprice=high+ATR/5
    
    
    elsif high[1]>W3dn+(((barindex[1]-W3dnbar)*Atan(Angle24))/100*W3dn)+ATR/5 and close<W3dn+(((barindex-W3dnbar)*Atan(Angle24))/100*W3dn)-ATR/5 and short[1]=0 and close>W1dn+ATR then
    
    SL=highest[8](high)+ATR
    trendbreak=1
    ENTRY=low-ATR/5
    ENTRYbar=barindex
    trendbreakprice=high+ATR/5
    elsif open[1]>W4dn+(((barindex[1]-W4dnbar)*Atan(Angle24))/100*W4dn) and close<W4dn+(((barindex-W4dnbar)*Atan(Angle24))/100*W4dn)-ATR/5 and short[1]=0 and low>max(W1dn,W4dn)+ATR then
    
    //test=W4dn+(((barindex-W4dnbar)*Atan(Angle24))/100*W4dn)
    //drawtext("#test#",barindex,high+ATR,SansSerif,Bold,10) coloured (255,0,10)
    SL=highest[8](high)+ATR
    
    trendbreak=1
    ENTRY=low-ATR/5
    ENTRYbar=barindex
    trendbreakprice=high+ATR/5
    elsif (signaldn=1 or signaldn[1]=1) and CrossDn and short[1]=0 and highest[8](high)-halftrend2<RRatr*ATR*ATR and halftrend2>W3dn and halftrend2>W1dn and signalHA=1 then
    
    SL=highest[8](high)+ATR
    
    trendbreak=1
    ENTRY=min(open,halftrend2-ATR/5)
    ENTRYbar=barindex
    trendbreakprice=high+ATR/5
    endif
    
    endif
    
    if trendbreak=1 and ENTRYbar<>0 and barindex-ENTRYbar>10 then
    trendbreak=0
    endif
    
    
    
    
    
    
    
    //test=wolve
    //drawtext("#test#",barindex,high+2,SansSerif,Bold,10) coloured (0,0,10)
    
    
    
    //Si on a eu un signal Achat Vente, on prend le trade à la cassure du nieau d'entrée
    if trendbreak and bull[1]=1 and long[1]=0 then
    
    if high>entry then
    DRAWARROWUP(barindex,low) coloured (0,255,10)
    drawtext("wolve",barindex,low-ATR/5,SansSerif,Bold,10) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("---",barindex,ENTRY,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    long=1
    TP1=0
    TP2=0
    TP3=0
    wolve=0
    trendbreak=0
    bull=0
    endif
    
    endif
    
    if trendbreak and bull[1]=-1 and short[1]=0 then
    
    if low<entry then
    
    DRAWARROWDOWN(barindex,high) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("wolve",barindex,high+ATR/5,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("---",barindex,ENTRY,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    short=1
    wolve=0
    TP1=0
    TP2=0
    TP3=0
    trendbreak=0
    bull=0
    endif
    endif
    //GESTION SL
    If short=1 and high>SL then
    
    short=0
    if SL=entry then
    drawtext("SL BE wolve",barindex,high+ATR/5,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    else
    drawtext("SL wolve",barindex,high+ATR/5,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    //drawtext("#SL#",barindex,SL,SansSerif,Bold,16) coloured (255,0,10)
    drawtext("---",barindex,SL,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    
    If long=1 and low<SL then
    long=0
    if SL=entry then
    drawtext("SL BE wolve",barindex,low-ATR/5,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    else
    drawtext("SL wolve",barindex,low-ATR/5,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    drawtext("---",barindex,SL,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    
    ///GESTION TP SHORT
    
    if entry-W1dn<4*ATR then
    TP1Sell=W1dn
    else
    TP1Sell=W3dn
    endif
    
    If short=1 and low<TP1Sell and TP1=0 then
    drawtext("TP1 wolve",barindex,low-ATR,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("---",barindex,TP1Sell,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    if entry-TP1Sell>ATR then
    SL=ENTRY//endif
    endif
    TP1=1
    endif
    
    If short=1 and low<W4dn+ATR/5 and TP2=0 then
    drawtext("TP2 wolve",barindex,low-ATR,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("---",barindex,W4dn+ATR/5,SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    //SL=W1dn
    TP2=1
    SL=ENTRY
    //short=0
    endif
    
    
    If short=1 and low<W4dn-(((barindex-W4dnbar)*Atan(AngleTP3))/100*W4dn) and TP3=0 then
    drawtext("TP3 wolve",barindex,low-ATR,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    drawtext("---",barindex,W4dn-(((barindex-W4dnbar)*Atan(AngleTP3))/100*W4dn),SansSerif,Bold,16) coloured (RcolorSell,GcolorSell,BcolorSell)
    TP3=1
    short=0
    
    if showline then
    drawsegment(W1dnbar,W1dn,barindex,W4dn-(((barindex-W4dnbar)*Atan(AngleTP3))/100*W4dn)) coloured(0,0,0)
    endif
    
    endif
    
    
    ///GESTION TP LONG
    if W1up-entry<4*ATR then
    TP1buy=W1up
    else
    TP1Buy=W3up
    endif
    
    If long=1 and high>TP1Buy and TP1=0 then
    drawtext("TP1 wolve",barindex,high+ATR,SansSerif,Bold,10) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("---",barindex,TP1Buy,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    if TP1Buy-entry>ATR then
    SL=ENTRY//endif
    endif
    TP1=1
    
    endif
    
    If long=1 and high>W4up-ATR/5 and TP2=0 then
    drawtext("TP2 wolve",barindex,high+ATR,SansSerif,Bold,10) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("---",barindex,W4up-ATR/5,SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    //SL=W1up
    TP2=1
    SL=ENTRY
    //long=0
    endif
    
    If long=1 and high>W4up+(((barindex-W4upbar)*Atan(AngleTP3))/100*W4up) and TP3=0 then
    
    drawtext("TP3 wolve",barindex,high+ATR,SansSerif,Bold,10) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    drawtext("---",barindex,W4up+(((barindex-W4upbar)*Atan(AngleTP3))/100*W4up),SansSerif,Bold,16) coloured (RcolorBuy,GcolorBuy,BcolorBuy)
    TP3=1
    long=0
    
    if showline then
    drawsegment(W1upbar,W1up,barindex,W4up+(((barindex-W4upbar)*Atan(AngleTP3))/100*W4up)) coloured(0,0,0)
    endif
    
    endif
    
    if long=1 and barindex-ENTRYBAR>100 then
    long=0
    bull=0
    wolve=0
    drawtext("end wolve",barindex,high+ATR,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    if short=1 and barindex-ENTRYBAR>100 then
    short=0
    bull=0
    wolve=0
    drawtext("end wolve",barindex,high+ATR,SansSerif,Bold,10) coloured (RcolorSell,GcolorSell,BcolorSell)
    endif
    
    //Si on a eu une figure de wolfe, mais qui est invalidée, on reset tout
    
    if bull=1 and (high>lastmax or (bullcross and lastmin>prevlastmin) or (bearcross and bull[1]=1)) then
    bull=0
    wolve=0
    
    endif
    if bull=-1 and (low<lastmin or (bearcross and lastmax<prevlastmax) or (bullcross and bull[1]=-1)) then
    //if bull=-1 and low<lastmin then
    bull=0
    wolve=0
    
    endif
    
    return
    
    Zigo, Al, Dom and 6 others thanked this post
    #125180 quote
    Nicolas
    Keymaster
    Master

    Thank you Stefou for giving back to this community, that’s very kind of you.

    #130591 quote
    thierrybl
    Participant
    Junior

    I’m looking for a long time for a wolfe waves indicator without success ! Thanks a lot for sharing !

     

    Thierry

    #130614 quote
    thierrybl
    Participant
    Junior

    Hello,

     

    When I try to put it on a graph, I have an error message (see photo).

    I don’t find the error. Could you have a look at it ?

     

    Thanks a lot

    error.jpg error.jpg
    #130788 quote
    thierrybl
    Participant
    Junior

    It’s ok now.

    My error was because of too much units on the graph.

    As it’s limited to 5000 by program, I had an error message.

    Congratulation for this indic, it works perfectly !

    Is it possible to convert it to a screener easily ? For example when point 4 is confirmed or when price are near point 5 ?

     

    Thanks a lot for sharing.

     

    Thierry

    #154891 quote
    Friend
    Participant
    Average

    Hi guys,

     

    Fantastic indicator, what a job! Thanks to Stefou for sharing.

     

    I use the indicator on 12 templates in various timeframe charts. Because the Wolfe pattern now only shows itself when it is completed, I sometimes do not immediately notice.

    Is it possible to program a sound signal and/or popup after the 4 highs/ lows have been formed? (Line 234 till 260 in the script)

    And if so, is this also possible at the first crossing of (the continuation of) line 1-3 (point 5)?

     

    Or is there another option, for example by setting an alert?

     

    Thanks in advance!

    #167779 quote
    evinot
    Participant
    Junior

    What awesome indicator. I thrive a little bit to understand the code because it is pretty complex. Thank you so much for sharing. I appreciate very much because it is a lot of work.

    #192623 quote
    GPTrader64
    Participant
    Average

    Merci pour le partage de cette  indicateur

    Beau travail

    Thank you for sharing this indicator

    Nice work

    #192626 quote
    robertogozzi
    Moderator
    Master

    @GPTrader64

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Thanks 🙂

    #192640 quote
    Nicolas
    Keymaster
    Master
    #205460 quote
    Johan
    Participant
    Average

    Very nice indicator, Thank you! Have anybody tried to make a ProOrder strategy out of it?

    #205823 quote
    robertogozzi
    Moderator
    Master

    @Johan

    when do you want to go Long and Short?

    what SL and TP do you want?

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

Wolfe waves indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
stefou102 @stefou102 Participant
Summary

This topic contains 11 replies,
has 6 voices, and was last updated by robertogozzi
3 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/08/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...