créer un itf sur stochastique

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

    bonjour, j interroge chatgpt pour crére l’ itf suivant

    sur prorealtime, creer un programme itf qui est le suivant: achat si stochastique(5,3,3) croise à la hausse la stochatique (9,3,3) et vente si inversement la stochastique(5,3,3) croise à la baisse la stochastique (9,3,3)

     

    voici ce qu il répond avec bcp d ‘erreurs

    // Paramètres des stochastiques
    STOCH_FAST_K = Stochastic[5,3,3]
    STOCH_SLOW_K = Stochastic[9,3,3]

    // Conditions d’achat et de vente
    CROSS_UP = (STOCH_FAST_K CROSSES OVER STOCH_SLOW_K)
    CROSS_DOWN = (STOCH_FAST_K CROSSES UNDER STOCH_SLOW_K)

     

    qui pourrait l ecorriger?

    Merci bien

    #245002 quote
    LaMaille
    Participant
    Junior

    Il faut retirer les underscores…

    Iván González thanked this post
    #245006 quote
    Iván González
    Moderator
    Master
    STOCHFASTK = Stochastic[5,3](close)
    STOCHSLOWK = Stochastic[9,3](close)
    
    // Conditions d’achat et de vente
    CROSSUP = (STOCHFASTK CROSSES OVER STOCHSLOWK)
    CROSSDOWN = (STOCHFASTK CROSSES UNDER STOCHSLOWK)
    
    return CROSSUP, CROSSDOWN
    robertogozzi thanked this post
    #245104 quote
    geroniman
    Participant
    Average

    merci bien

    #245105 quote
    geroniman
    Participant
    Average

    merci mais il y a une erreur sur le code. Comment faire pour faire apparaitre des fleches de crosiement sur le graphique de prix?

    #245106 quote
    robertogozzi
    Moderator
    Master

    Aucune erreur n’est signalée. Cela fonctionne parfaitement SOUS le graphique.
    Si vous le souhaitez SUR le tableau des prix, il doit être remplacé par les instructions graphiques appropriées :

    STOCHFASTK = Stochastic[5,3](close)
    STOCHSLOWK = Stochastic[9,3](close)
     
    // Conditions d’achat et de vente
    CROSSUP = (STOCHFASTK CROSSES OVER STOCHSLOWK)
    CROSSDOWN = (STOCHFASTK CROSSES UNDER STOCHSLOWK)
    
    IF CROSSUP THEN
       DrawArrowUP(BarIndex,low - highest[5](range)) coloured("Green")
    ELSIF CROSSDOWN THEN
       DrawArrowDOWN(BarIndex,high + highest[5](range)) coloured("Red")
    ENDIF
     
    return//CROSSUP, CROSSDOWN
    Iván González thanked this post
    #245135 quote
    geroniman
    Participant
    Average

    parfait merci bien

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

créer un itf sur stochastique


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
geroniman @geroniman Participant
Summary

This topic contains 6 replies,
has 4 voices, and was last updated by geroniman
11 months, 2 weeks ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 03/18/2025
Status: Active
Attachments: No files
Logo Logo
Loading...