Ichimoku Tenkan-Kijun Cross

Ichimoku Tenkan-Kijun Cross

This code shows an Ichimoku indicator, for Tenkan-Kijun cross.
+1 for buy conditions
-1 for sell conditions

Buy conditions :

Tenkan crosses over Kijun

Tenkan & Kijun > Kumo

Close > Kumo

Chikou > Kumo

Sell conditions : the opposite

Happy Trading !

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. supertiti • 03/25/2016 #

    comment remonte t’on une image ici ? je ne vois pas le bouton qui va bien …merci

  2. Doctrading • 03/25/2016 #

    Bonjour,
    Je n’ai pas bien compris la question, que veux-tu dire par “remonter” une image ?
    Je ne crois pas qu’on puisse rajouter une image à un post effectivement.Peut être que l’adminisstrateur lui le peut, avec un code HTML.

  3. supertiti • 03/25/2016 #

    oui c’est cela si je veux ajouter une image je ne peux pas !
    c’etait pour visualiser la chikou qui doit être reportée 26 jours en arrière dans le système Ichimoku

  4. Doctrading • 03/25/2016 #

    A priori on ne peut pas ajouter d’image à un post.
    On verra si par la suite ce forum nous le permet.Cordialement,

  5. Nolamer • 03/25/2016 #

    Bonjour, 
    est ce possible de poster un programme Probacktest avec 

    Achat si Tenkan croisement à la hausse la Kijun 
    Vente si Tenkan croisement à la baisse la Kijun 

    Cordialement 

  6. elabuelomanyo • 03/25/2016 #

    Hola buenas noches
    Perdonen por escribir en español 
           Forgive me for writing in Spanish //
           Pardonnez-moi pour écrire en espagnol
    El codigo y el fichero itf, no hacen lo que dice. en mi plataforma ProRealTime 10.2 las lineas 3 y 4 dan error hay que ponerles de que precio se hace el maximo y el minimo; las he sustituido por
    Tenkansen = (highest[9](close)+lowest[9](close))/2Kijunsen = (highest[26](close)+lowest[26](close))/2
    Para que el codigo y el fichero haga algo se debe cambiar mas codigo.
     
    ////////////
    //
    // Codigos sacados de http://www.prorealcode.com/prorealtime-indicators
    // http://www.prorealcode.com/library-list-view/
    //
    // Ichimoku Tenkan-Kijun Cross
    // This code shows an Ichimoku indicator, for Tenkan-Kijun cross.
    ////////////

    // +1 for buy conditions
    // -1 for sell conditions

    // Buy conditions :
    // Tenkan crosses over Kijun
    // Tenkan & Kijun > Kumo
    // Close > Kumo
    // Chikou > Kumo

    INDICATEUR = 0
    cero = 0

    Tenkansen = (highest[9](close)+lowest[9](close))/2
    Kijunsen = (highest[26](close)+lowest[26](close))/2

    SSpanA = (tenkansen[26]+kijunsen[26])/2
    SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2

    //Chikou = close[26]

    // ACHAT
    C1 = close > SSpanA and close > SSpanB
    C2 = Tenkansen crosses over Kijunsen
    C2ini = Tenkansen <= close
    //C3 = Tenkansen > SSpanA and Tenkansen > SSpanB
    //C4 = Kijunsen > SSpanA and Kijunsen > SSpanB
    //C5 = Chikou > SSpanA[26] and Chikou > SSpanB[26]
    if C2ini then
    // cruce previo con el precio
    INDICATEUR = INDICATEUR + .5
    IF C2 or Tenkansen >= Kijunsen then
    // cruces de medias 9, 26 o medias en tendencia
    INDICATEUR = INDICATEUR + .5
    if C1 then
    // ademas por encima de la nube
    INDICATEUR = INDICATEUR + .5
    endif
    endif
    endif

    //IF C1 and C2 and C3 and C4 and C5 THEN
    //INDICATEUR = 1
    //ENDIF

    // VENTE
    C1v = close < SSpanA and close < SSpanB
    C2v = Tenkansen crosses under Kijunsen
    C2vpre = Tenkansen >= close
    //crosses over close
    //C2vpreT = Tenkansen
    //C2vprec = close[9]
    //C3v = Tenkansen < SSpanA and Tenkansen < SSpanB
    //C4v = Kijunsen < SSpanA and Kijunsen < SSpanB
    //C5v = Chikou < SSpanA[26] and Chikou < SSpanB[26]
    if C2vpre then
    // previo con el precio
    INDICATEUR = INDICATEUR - .5
    endif
    IF C2v then
    // cruces a laa baja
    INDICATEUR = - .5
    if C1v then
    // ademas por debajo de la nube
    INDICATEUR = INDICATEUR - .5
    endif
    endif
    if C1 and INDICATEUR < 0 then
    // ademas por encima de la nube
    INDICATEUR = 0.2
    endif

    //IF C1v and C2v and C3v and C4v and C5v THEN
    //INDICATEUR = -1
    //ENDIF

    return INDICATEUR as \"ICHIMOKU TKC\", cero as \"cero\"
    Un saludo.

  7. Doctrading • 03/25/2016 #

    The real formula is : 
    Tenkansen = (highest[9](HIGH)+lowest[9](LOW))/2
    Kijunsen = (highest[26](HIGH)+lowest[26](LOW))/2
    But for me it works without “high” or “low”We must write High and Low to be certain that it will work properly

  8. elabuelomanyo • 03/25/2016 #

    Gracias por la aclaración Doctrading.
    Con ese cambio, en el codigo inicial sigue saliendo una recta en cero.
    Cuando  tenga todo el codigo mirado lo volvere a postear
    Un saludo

  9. elabuelomanyo • 03/25/2016 #

    Hola buenas noches,
    Con el codigo inicial y el acmbio propuesto por Doctrading si sale los cruces, pero no todos; solo aquellos en que se cumplen todas las condiciones.
    Las condiciones C5 y C5v son muy restrictvas
    // Chikou > Kumo// linea de precio retrasada 26 periodos por encima de la nube// Chikou < Kumo// linea de precio retrasads 26 periodos por debajo de la nube
    Creo que hay que dar mas peso a la condicion de que el Tenkansen este por debajo o por encima del precio.
    Un saludo

  10. cami1974 • 03/25/2016 #

    Hello,

    Thanks for this code.

    It seems that “crosses over” and “crosses under” functions have a bug when both variables are identical on previous period: crossing it’s not detected.
    I’ve noticed this when testing Tenkan and Kijun crossing (“Tenkansen crosses over Kijunsen”): they can be identical for several periods.
    When replaced by double comparison (“Tenkansen > Kijunsen and Tenkansen[1] Kijunsen and Tenkansen[1] <= Kijunsen[1]
    C1 = Tenkansen crosses over Kijunsen
    IF C1 THEN
    DRAWARROWUP(barindex, low-atr) coloured(0, 155, 10)
    DRAWTEXT("TST+", barindex, low-atr*3, SansSerif, Bold, 30) coloured(0, 155, 10)
    ENDIF

    //C1v = Tenkansen = Kijunsen[1]
    C1v = Tenkansen crosses under Kijunsen
    IF C1v THEN
    DRAWARROWDOWN(barindex, high+atr) coloured(255, 0, 10)
    DRAWTEXT(“TST-“, barindex, high+atr*3, SansSerif, Bold, 30) coloured(255, 0, 10)
    ENDIF

    This is a known problem? Do I need to change all my code that uses these functions?

    Thanks in advance.

  11. cami1974 • 03/25/2016 #

    Hello,

    Thanks for this code.

    It seems that “crosses over” and “crosses under” functions have a bug when both variables are identical on previous period: crossing it’s not detected.
    I’ve noticed this when testing Tenkan and Kijun crossing (“Tenkansen crosses over Kijunsen”): they can be identical for several periods.
    When replaced by double comparison (“Tenkansen > Kijunsen and Tenkansen[1] <= Kijunsen[1]") everything works fine.

    When using these functions with a constant ("Tenkansen crosses over 15"), everything works fine.

    I will post the code that I've used to test it in the next post.

    This is a known problem? Do I need to change all my code that uses these functions?

    Thanks in advance.

  12. cami1974 • 03/25/2016 #

    // Check this error on Vallourec UT1h for candle 13/11/2017 09:00

    p1=9
    p2=26
    Tenkansen = (highest[p1](high)+lowest[p1](low))/2
    Kijunsen = (highest[p2](high)+lowest[p2](low))/2

    //C1 = Tenkansen > Kijunsen and Tenkansen[1] <= Kijunsen[1]
    C1 = Tenkansen crosses over Kijunsen
    IF C1 THEN
    DRAWARROWUP(barindex, low-atr) coloured(0, 155, 10)
    DRAWTEXT("TST+", barindex, low-atr*3, SansSerif, Bold, 30) coloured(0, 155, 10)
    ENDIF

    //C1v = Tenkansen = Kijunsen[1]
    C1v = Tenkansen crosses under Kijunsen
    IF C1v THEN
    DRAWARROWDOWN(barindex, high+atr) coloured(255, 0, 10)
    DRAWTEXT(“TST-“, barindex, high+atr*3, SansSerif, Bold, 30) coloured(255, 0, 10)
    ENDIF

  13. Sebausse • 03/25/2016 #

    I have corrected the code which was only returning “buy” condition:

    Tenkansen = (highest[9]+lowest[9])/2
    Kijunsen = (highest[26]+lowest[26])/2

    SSpanA = (tenkansen[26]+kijunsen[26])/2
    SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2

    Chikou = close[26]

    // ACHAT
    C1 = close > SSpanA and close > SSpanB
    C2 = Tenkansen crosses over Kijunsen
    C3 = Tenkansen > SSpanA and Tenkansen > SSpanB
    C4 = Kijunsen > SSpanA and Kijunsen > SSpanB
    C5 = Chikou > SSpanA[26] and Chikou > SSpanB[26]
    LongCondition = C1 and C2 and C3 and C4 and C5

    // VENTE
    C1v = close < SSpanA and close < SSpanB
    C2v = Tenkansen crosses under Kijunsen
    C3v = Tenkansen < SSpanA and Tenkansen < SSpanB
    C4v = Kijunsen < SSpanA and Kijunsen < SSpanB
    C5v = Chikou < SSpanA[26] and Chikou < SSpanB[26]
    ShortCondition = C1v and C2v and C3v and C4v and C5v

    If LongCondition then
    Result = 1
    endif

    If ShortCondition then
    Result = -1
    endif

    SCREENER[(LongCondition) Or (ShortCondition)] (Result as "Go")

  14. Domingos Amoedo • 03/25/2016 #

    Hello, thanks for this code.
    I need to change the c5 and c5v conditions for this ones:

    C5 (for long positions): the Chikou Span is above the price curve.
    C5V (for short positions): the Chikou Span is below the price curve.

    These two conditions add greater strength to buy/sell signals.

    Thanks in advance.

  15. Ronny • 03/25/2016 #

    Should C5 = Chikou > SSpanA[26] and Chikou > SSpanB[26] be C5 = Chikou > SSpanA and Chikou > SSpanB? Shouldn’t we check if Chikou is above the CURRENT cloud? Or am I missing something?

  16. Emperor.it • 03/25/2016 #

    Chikou = close[26] it’s a mistake. Chikou Span is today’s closing moved back 26 periods. It is not the close of 26 periods ago.

    • Nicolas • 03/25/2016 #

      Indeed, there is a mistake in that code. It is often the case when using Ichimoku and its translated lines backward or forward

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
khashayar
3 years ago
ichimoku soft
ichimoku soft
2
Indicators
DELBERT Bonjour , je voudrais savoir si votre indicateur peut être installé sur PRT V.10.3 ou s'il e...
khashayar Hi I wrote for version 11. But I think it works for version 10.3 as well. Thanks
Boris Hi IVMcm, thanks for your amazing work. I have tested all of your indicators and use some of...
IV Mcm With pleasure and thanks!
ashiash how to use this indicator can i use tradingview platform
Maxime Baudin Merci l'ami, passe une bonne semaine
IV Mcm Merci de même ;)
Zigo Zou je graag helpen, maar mijn computer is in onderhoud. Einde deze week, kan ik hopelijk te...
Zigo @ DimKar Midline = (stlong + stshort)/2 Return stLong coloured(0,255,0) as"StopLong", M...
DimKar Dear Zigo thank you very much for your answer !!!
IV Mcm Line 68 and 70, you must delete the instruction at the end of the line "" Bordercolor(0,0,0,...
BoutDePain This instruction is for the V11 maybe that you are using V10.3 then you can safely remove it.
Protagonist Bonjour, Je vois l'instruction inRange mais je ne trouve pas sa signification. Pouvez-vous...
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
jonny.cash the chikou is 26 periods behind current price, it's not the close
Nicolas Chikou is the current Close decayed 26 periods in the past of the chart.
jonny.cash yes, thanks for the correction. my post was complete rubbish
Nicolas le code est déjà sur cette page, inutile de fournir un autre format ?! Les fichiers itf sont...
Novice-Surfer Hello IV Mcm, You are my leader ! Your work is incredibly precise, thank you very much f...
Mikolajek Merci pour votre excellent travail !
IV Mcm Bonjour, Je ne reconnais pas cette ligne dans le code, essayer de télécharger directement le...
Manu L. Bonjour, Possible de créer un screnner multiframe Mois dans Ichimoku semaine dans Ichimok...
Zigo
5 years ago
denmar Neat. Thanks.
Zigo Line 39 TS has to be KS Line 41 TS has to be KS
cristofer Same here, as the long version, adding SMA200: sma200 = Average[200](Close) > Close ...
cristofer mate, I just realised that the formula for TenakanSen is wrong, it should be: TS=(highe...
cristofer Very nice! thanks for sharing this. I added (as a personal preference) that the Close mus...
cristofer same here with the TS formula: TS=(highest[9](high) + highest[9](low))/2 source: h...
Gubben So far so good. After a long drawdown it was winning four times in five weeks. Since 24 jul...
pat95162 Salut Pourquoi je n'ai pas les même résultats que vous
UkCoopDownUnder Any hints for us, on which variables we should be optimising ? As of November 2020, the cu...
Jan
6 years ago
Kovit Hi guys, please could someone help with a bit of Ichimoku code that will improve performance...
Kovit lol I should be more exact with my wording, more accurately I was looking for an indicator t...
jm121212 how can we change the default settings?
robert123 hi there, how do you get the images of the knights etc into your code....and is there anywhe...
swapping hello robert123, on this site -> https://fr.piliapp.com/symbol/

Top