UT BOT ALERTS

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #207767 quote
    Marlaynicolas
    Participant
    New

    Bonjour je suis tombé sur une vidéo du site trippatrading avec indicateur UT BOT ALERTS avec linear regression candles.
    Pour du scalping 5 minutes.
    je vous joint un copie coller de l’indicateur ut bot alerts du site trading view.
    J’attire l’attention de nicolas ou autre personne doué pour apporter votre savoir et la paramétrer si possible pour le prt. Je ne suis pas encore à ce niveau malheureusement.

    //@version=4
    study(title=”UT Bot Alerts”, overlay = true)

    // Inputs
    a = input(1, title = “Key Vaule. ‘This changes the sensitivity'”)
    c = input(10, title = “ATR Period”)
    h = input(false, title = “Signals from Heikin Ashi Candles”)

    xATR = atr(c)
    nLoss = a * xATR

    src = h ? security(heikinashi(syminfo.tickerid), timeframe.period, close, lookahead = false) : close

    xATRTrailingStop = 0.0
    xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src – nLoss),
    iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss), iff(src > nz(xATRTrailingStop[1], 0), src – nLoss, src + nLoss)))

    pos = 0
    pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,
    iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0))) xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue ema = ema(src,1) above = crossover(ema, xATRTrailingStop) below = crossover(xATRTrailingStop, ema) buy = src > xATRTrailingStop and above
    sell = src < xATRTrailingStop and below barbuy = src > xATRTrailingStop
    barsell = src < xATRTrailingStop plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green, textcolor = color.white, transp = 0, size = size.tiny) plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, location = location.abovebar, color= color.red, textcolor = color.white, transp = 0, size = size.tiny) barcolor(barbuy ? color.green : na) barcolor(barsell ? color.red : na) alertcondition(buy, "UT Long", "UT Long") alertcondition(sell, "UT Short", "UT Short")

    #207769 quote
    Nicolas
    Keymaster
    Master

    Sauf erreur de ma part, et à la lecture du code, il s’agit ni plus ni moins que des prises de positions sur un trailing stop de type ATR, soit un SuperTrend ou assimilé.

    Marlaynicolas thanked this post
    #207773 quote
    Marlaynicolas
    Participant
    New

    bonjour nicolas, merci pour le retour

    #207774 quote
    Marlaynicolas
    Participant
    New

    je te dérange et relance une nouvelle fois je voulais avoir ton avis également sur nadasq 5 minutes que j’ai partagé.

    #210343 quote
    Moe
    Participant
    New

    Bonjour Nicolas. Mes excuses à l'avance car j'écris dans un forum français. À tout hasard, le code des alertes UT BOT peut être traduit en un filtre et un indicateur. Merci beaucoup 🙂

    cedric croze thanked this post
    #218552 quote
    francois5555
    Participant
    New

    Bonjour

    Pour le faire fonctionné sur PRT (comme il va correctement sut tradingview) , sans les “erreurs” … il faut faire quoi

    Désolé , je débute sur ce genre de “code” et je suis ultra néophite …

    Mercide votre aide

    François

    cedric croze thanked this post
    #218569 quote
    Nicolas
    Keymaster
    Master

    Ce code donne les signaux d’un SuperTrend calculé avec le Close d’une bougie Heikin Ashi (TOTALPRICE), soit :

    a = 1 //Key Vaule. ‘This changes the sensitivity'
    c = 10 //ATR Period
    
    multiplier=a
    period=10
    
    moy=averagetruerange[period](close)
    iprice=totalprice
    up=iprice+multiplier*moy
    dn=iprice-multiplier*moy
    once trend=1
    if close>up[1] then
    trend=1
    elsif close<dn[1] then
    trend=-1
    endif
    if trend<0 and trend[1]>0 then
    flag=1
    else
    flag=0
    endif
    if trend>0 and trend[1]<0 then
    flagh=1
    else
    flagh=0
    endif
    if trend>0 and dn<dn[1] then
    dn=dn[1]
    endif
    if trend<0 and up>up[1] then
    up=up[1]
    endif
    if flag=1 then
    up=iprice+multiplier*moy
    endif
    if flagh=1 then
    dn=iprice-multiplier*moy
    endif
    if trend=1 then
    mysupertrend=dn
    else
    mysupertrend=up
    endif
    if mysupertrend > mysupertrend[1] then
    color1=0
    color2=255
    color3=0
    elsif mysupertrend < mysupertrend[1] then
    color1=255
    color2=0
    color3=0
    endif
    
    if iprice crosses over mysupertrend then 
    drawarrowup(barindex,mysupertrend) coloured("green")
    endif 
    if iprice crosses under mysupertrend then 
    drawarrowdown(barindex,mysupertrend) coloured("red")
    endif 
    
    return mysupertrend coloured (color1,color2,color3) as "SuperTrend"
    cedric croze thanked this post
    UT-BOT-ALERTS.png UT-BOT-ALERTS.png
    #218577 quote
    francois5555
    Participant
    New

    Bonjour Nicolas

    Grand merci pour votre aide …. mais qd le met dans PRT , système de trading, créer, … il me dit que la “ligne 1: Une des expressions suivantes serait plus appropriée que “drawarrowup” : endif

    Désolé d’être aussi nul

    Bonne journée et merci de votre aide

    François

    #218578 quote
    Nicolas
    Keymaster
    Master

    Ce n’est pas une stratégie mais un code d’indicateur. Pour la stratégie, voir le code ci-dessous:

    defparam cumulateorders=false 
    
    a = 1 //Key Vaule. ‘This changes the sensitivity'
    c = 10 //ATR Period
    
    multiplier=a
    period=10
    
    moy=averagetruerange[period](close)
    iprice=totalprice
    up=iprice+multiplier*moy
    dn=iprice-multiplier*moy
    once trend=1
    if close>up[1] then
    trend=1
    elsif close<dn[1] then
    trend=-1
    endif
    if trend<0 and trend[1]>0 then
    flag=1
    else
    flag=0
    endif
    if trend>0 and trend[1]<0 then
    flagh=1
    else
    flagh=0
    endif
    if trend>0 and dn<dn[1] then
    dn=dn[1]
    endif
    if trend<0 and up>up[1] then
    up=up[1]
    endif
    if flag=1 then
    up=iprice+multiplier*moy
    endif
    if flagh=1 then
    dn=iprice-multiplier*moy
    endif
    if trend=1 then
    mysupertrend=dn
    else
    mysupertrend=up
    endif
    
    if iprice crosses over mysupertrend and not longonmarket  then
    buy at market 
    endif
    if iprice crosses under mysupertrend and not shortonmarket then
    sellshort at market 
    endif
    
    
    Eduardo M thanked this post
    #218607 quote
    francois5555
    Participant
    New

    Re bonjour Nicolas

     

    Merci pour votre aide , ça fonctionne bon week-end

     

    François

    #223414 quote
    carpentier Joffrey
    Participant
    New

    Bonjour Nicolas,

    Merci pour votre paramétrage, cependant j’ai un problème sur la ligne 1, 48, 49 et 50.

    Des triangles d’avertissement et des vagues de correction.

    Ligne 1 : cumulateorders

    Ligne 48 : buy

    Ligne 49 : endif

    Ligne 50 : if

    Pouvez vous svp me donner votre avis ?

    Merci,

    #223427 quote
    GraHal
    Participant
    Master

    Je confirme que la Stratégie fonctionne bien, je ne reçois aucun triangle d’avertissement ni message de correction.

    rencontrez-vous avec les lignes que vous indiquez dans votre message ci-dessus ?

    #223430 quote
    GraHal
    Participant
    Master

    Mon message ci-dessus, la 2ème ligne aurait dû lire…

    Quels problèmes rencontrez-vous avec chacune des lignes que vous indiquez dans votre message ci-dessus ?

    #223431 quote
    JC_Bywan
    Moderator
    Master

    Là où François5555 avait tenté d’insérer le code du post #218569 (un indicateur pour probuilder) dans proorder par erreur, il semble probable au vu des rejets de mots-clés spécifiques à proorder (cumulateorders, buy) que tu aies tenté de faire l’inverse: insérer le code du post #218578 (une stratégie pour proorder) dans probuilder par erreur.

    Si c’est le cas, une fois qu’on a cliqué sur le bouton “indicateurs et systèmes de trading”, la fenêtre qui s’ouvre a plusieurs onglets, il faut s’assurer de bien choisir l’onglet “indicateurs” si le code se termine par return, ou de bien choisir “probacktest & trading automatique” si le code est une stratégie avec des mots-clés liés au passage d’ordres (et sans return à la fin).

    #223447 quote
    GraHal
    Participant
    Master

    Déductions de 1ère classe JC_Bywan … bravo !!

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

UT BOT ALERTS


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 14 replies,
has 7 voices, and was last updated by GraHal
2 years, 4 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/20/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...