Aucun trade pour ma strategie ichimoku !!

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #180441 quote
    jerome974
    Participant
    Average

    Bonjour,

    Je croyais avoir trouve le bon code mais ma stratégie finalement ne déclenche aucun trades !! Sauriez vous dire pourquoi ?

    je précise qu’il faut qu’un ordre se déclenche quand senkou span A croise a la hausse senkou span B et ce MÊME SI LE CROISEMENT NE FAIT 26 PÉRIODES EN AVANT.

    Ci dessous le code. Merci de votre aide

    defparam cumulateorders=false

    //K = (highest[26](high)+lowest[26](low))/2
    //T =(highest[9](high) + highest[9](low))/2
    //SA = (T[1]+K[1])/2
    //SB =(highest[52](high) + lowest[52](low))/2
    //— ichimoku parameters

    K = (highest[26](high)+lowest[26](low))/2
    T =(highest[9](high) + highest[9](low))

    p1=9
    p2=26
    p3=52
    p4=0

    SA=(t[p4]+k[p4])/2
    SB=(highest[p3](high[p4])+lowest[p3](low[p4]))/2

    SA=(t[p4]+k[p4])/2
    SB=(highest[p3](high[p4])+lowest[p3](low[p4]))/2

    c1 = SA [1] CROSSES OVER SB[1]
    c2 = SA [1] CROSSES UNDER SB[1]

    if c1  then
    buy 1 contract at market
    endif

    if c2 then
    sell at market
    endif

    #180442 quote
    fifi743
    Participant
    Master

    voici le code que j’utilise pour ichimoku

    defparam cumulateorders=false
    // ichimoku
    Tenkan = (highest[9](high)+lowest[9](low))/2
    Kijun = (highest[26](high)+lowest[26](low))/2
    SSpanA = (tenkan[26]+kijun[26])/2
    SSpanB = (highest[52](high[26])+lowest[52](low[26]))/2
    c1 = SSpanA CROSSES OVER SSpanB
    c2 = SSpanA CROSSES UNDER SSpanB
    
    if c1  then
    buy 1 contract at market
    endif
    
    if c2 then
    sell at market
    endif
    Nicolas and jerome974 thanked this post
    #180453 quote
    jerome974
    Participant
    Average

    Bonjour,

    Oui merci pour le code qui fonctionne bien, mais pas comme je voudrais… peut être je fais une erreur de logique ! ou peut être que cela revient au même !

    en fait je voudrais que les ordres se déclenchent sur la bougie n quand le croissement se fait a n +26 périodes de SSA et SSB.

    Qu en pensez vous ? est ce possible sur prorealtime ?

    Merci

    Cordialement

    Jérôme

    #180540 quote
    Swingueur
    Participant
    Average

    Bonjour,
    Si c’est pour passer un ordre lors du croisement SSA et SSB dans le futur, il faut revenir au calcul de base de ces droites qui sont simplement projetees dans le futur.

    SSpanA_future = (tenkan+kijun)/2
    SSpanB_future = (highest[52](high)+lowest[52](low))/2
    #180555 quote
    jerome974
    Participant
    Average

    Bonjour Swingueur et merci  pour l’aide

    J’ ai modifie la stratégie comme indiqué mais pas de trades non plus …

    ci dessous j’ai mis le code en entier, je ne vois pas l erreur :(….

    DEFPARAM FLATBEFORE = 090000
    
    tenkan = (highest[26](high)+lowest[26](low))/2
    kijun = (highest[9](high) + highest[9](low))
    
    SSpanAfuture = (tenkan+kijun)/2
    SSpanBfuture = (highest[52](high)+lowest[52](low))/2
    
    
    
    
    c1 = (SSpanAfuture CROSSES OVER SSpanBfuture)
    
    IF c1  then
    buy 1 CONTRACT AT MARKET
    ENDIF
    
    c2 = (SSpanAfuture CROSSES UNDER SSpanBfuture)
    
    IF c2 THEN
    sell AT MARKET
    ENDIF
    #180558 quote
    Nicolas
    Keymaster
    Master

    Ton calcul de Kijun est mauvais, si tu fais un GRAPH de cette variable tu t’en rends compte immédiatement. Tu ajoutes 2 fois un prix, sans en faire la moyenne. De plus, je pense que la formule n’est pas correct, à vérifier :

    DEFPARAM FLATBEFORE = 090000
    
    tenkan = (highest[26](high)+lowest[26](low))/2
    kijun = (highest[9](high) + lowest[9](low))/2
    
    SSpanAfuture = (tenkan+kijun)/2
    SSpanBfuture = (highest[52](high)+lowest[52](low))/2
    
    
    c1 = (SSpanAfuture CROSSES OVER SSpanBfuture)
    
    IF c1 then
    buy 1 CONTRACT AT MARKET
    ENDIF
    
    c2 = (SSpanAfuture CROSSES UNDER SSpanBfuture)
    
    IF c2 THEN
    sell AT MARKET
    ENDIF
    
    graphonprice sspanafuture
    graphonprice sspanbfuture
    jerome974 thanked this post
    #180563 quote
    fifi743
    Participant
    Master

    le cacul de la tenkan et kijun son inversé

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

Aucun trade pour ma strategie ichimoku !!


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
jerome974 @jerome974 Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by fifi743
4 years, 4 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 10/27/2021
Status: Active
Attachments: No files
Logo Logo
Loading...