Problème fonctionnement stochastique sous ProOrder

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #152336 quote
    Olivier HerdtOlivier Herdt
    Participant
    New

    Bonjour, le bout de code ci-dessous fonctionne avec ProBackTest mais pas avec ProOrderAutoTrading… une idée ?

    sto = Stochastic[14,3](close)
    
    if sto crosses over 20 then
    statut = 1
    elsif sto crosses over 80 then
    statut = -1
    else
    statut = 0
    endif

    Avec ProOrderAutoTrading la fonction Stochastic renvoie systématiquemenr la valeur zéro…
    Merci.

    Edit par modérateur: code remis au bon format avec le bouton “insert PRT code”, merci de le faire directement dans les prochains messages, cf règles de publication du cadre jaune en bas de page.

    #152361 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    C'est le code que j'ai testé:

    defparam cumulateorders = false
    sell at market
    sto = Stochastic[14,3](close)
     
    if sto crosses over 20 then
       statut = 1
    elsif sto crosses over 80 then
       statut = 2
    else
       statut = 3
    endif
    buy statut contracts at market
    

    il négocie 1, 2 et 3 contrats en autotrading (1 seconde TF, France 40 Cash), les conditions sont donc correctement évaluées.

    x.jpg x.jpg
    #152379 quote
    NicolasNicolas
    Keymaster
    Legend

    Pourquoi crois-tu que ta valeur statut n’est jamais supérieure à 0 en auto trading ?

    (j’ai modifié le titre du sujet, 80 caractères disponibles: évitons d’utiliser des abréviations 😉 )

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Problème fonctionnement stochastique sous ProOrder


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by NicolasNicolas
5 years, 10 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 12/01/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...