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
marcosamo Hello and thank you for this indicator, I have a small problem, it only shows the pawn at th...
marcosamo in fact I just saw a rider, so everything works sorry for my previous question
swapping perfect marcosamo, coupled with ichimoku-price-pattern this is better ;)
quibe56 Bonjour, à priori les couleurs pour le Katana ne fonctionnent pas ( départ haussier ou élan...
swapping Bonjour quibe56, n'ayant pas rencontré ce défaut je continu néanmoins à structurer le code p...
XXXXVII Great job! Indeed it leaves to think ..
Jigsaw20000 Bonjour, vous auriez un conseil pour régler l'affichage de l'indicateur ? les textes s'affic...
juanj @Holy Grail, glad you like it. Would you perhaps mind sharing your results here: https://www...
CaptainCaveman I am reluctant to say this buy I was a member of Dr Elder trading group for a while . The fa...
micquan The design is too complex and the performance is low.
gabri
6 years ago
Jérôme Dumortier Thank's a lot !!!
Gaby333 Thanks Mate
Usul83 Do not understand the specifications
gblast I added this indicator to my pro real time but its not showing up on my candles. Its invisible
Rafa
7 years ago
Eusebio Garcia Nuez tambien con que indicador se puede compaginar el ichimoku
Rafa El chivato es el propio SCREENER, aparece cuando las condiciones se cumplen. Y se pueden com...
Rafa El chivato es el propio SCREENER, aparece cuando las condiciones se cumplen. Y se pueden com...
nwesterhuijs Thanks, only saw it just now.
juanj For the latest version and discussions see the Ichimoku thread here: https://www.prorealcod...
Louwrens Hi Juanj. Thanks for this. I am tying it as we speak. It does not trade that often, which is...
Rafa Hay una actualización de esta estrategia. Si miras mis posts es más robusta el screener. Un ...
javier.puig.rovira@gmail.com Cruce te refieres a: Tenkan Sen, con Kijun Sen?
Rafa Hola Javier, Perdona pero no entiendo tu pregunta, no veo ninguna variable que sea solo "cru...
Iber0 Asi quedaria con el spread de IG [IMG]http://i65.tinypic.com/2418ism.jpg[/IMG]
avatar
bjoern Seems to work nice on BUND - M15 with SL 70 and TP 120
hvluthy@sunrise.ch I tried to backtest this code but don't get any restults. Can any body help me?
Rohan
7 years ago
gabri Great job!! I love everything that involve Ichimoku. Did you think about changing the line t...
Rohan Thanx gabri. Yes I did play around with the offset. It works but I like the "earlier" warnin...
Dom Dominics Hi, Is this code can be used for MT4 ?
gabri Ichimoku is one of the best trend indicator ever together with the Guppy EMA's. I agree with...
primo1 thanks
traderkarnik Rohan, Have you tried encorporating momentum indicator? if waiting for future cross in your...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Nice Job ! Here is my version of the code :  KBO = 0 Tenkansen = (highest[9](high)+lowe...
gefinance Thanks for this code. The only thing left missing is the time lapse, otherwise, lots of old...
Nicolas Thanks for contributing to the "ichimoku section" of the prorealtime code library Don't he...
sourberry Thank you , this is a great indicator works beautifully. Could you kindly modify to scr...
pp_playaflamenca Excuse me,... reading your code about spanB: [ SenkouSpanBFutureW = (Highest[SenkouSpanPerio...
Dymjohn Thanks for the comment grizzly, I like the look of your position sizing coding but won't use...
Elsborgtrading Hi John, and nice to see you took the Ichimoku a step further:-) One thing though, I think t...
swede_trader It doesn't generate anything for me. And I can't debug it, any tips?
mcha bonjour, merci pour cet échange mais il me semble que ce twist des SSA  et SSB serait plus ...
Pasq Concernant la remarque précédente, il est possible de remplacer les 2 lignes de code de cett...
Nicolas Merci Pasq. On peut retrouver ce code corrigé sur le forum, je viens d'en retrouver un exemp...
Olivier7 // Original code // Ichimoku Tenkan-Kijun Cross (screener) // https://www.prorealcode.com/...
ipbvba erreur dans le code en ligne 2
mvinter Hi Doctrading im trying to use your tenkansen Kijunsen crossover screener but keep getting ...

Top