Hull ma automatique

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #72606 quote
    scofield
    Participant
    New

    Bonjours , j’essaye de crée un trading automatique avec l’indicateur ma hull , avec tous simplement achat quand c’est a la hausse et vente quand c’est a la baisse , le problème est que aucune position n’est prise , quelqu’un peut m’aider a le programmer ?

    merci

    #72610 quote
    Nicolas
    Keymaster
    Master

    Une idée ici dans ce sujet: https://www.prorealcode.com/topic/gd-hull/

    On utilisera les variables ‘newuptrend’ et ‘newdowntrend’ définit dans le code que j’ai donné pour placer des ordres d’achat et de vente en fonction donc de la direction de la moyenne mobile de Hull.

    #72611 quote
    scofield
    Participant
    New

    Je ne suis pas un grand expert , vous pouvez me donner des détails plus détailler svp

    #72612 quote
    scofield
    Participant
    New

    [attachment file=”Sans titre 1.gif”]
    En gros , j’essaye d’automatiser cela

    Sans-titre-1.png Sans-titre-1.png
    #72614 quote
    Nicolas
    Keymaster
    Master

    “Si tu donnes un poisson à un homme il mangera un jour; si tu lui apprends à pêcher, il mangera toujours” 😉

    Ci-dessous le code du trading automatique de la moyenne de Hull, pas de takeprofit ni de stoploss, à toi de voir si nécessaire d’en ajouter. Bon courage.

    defparam cumulateorders=false
    
    //HullMA, the Hull Moving Average:
    Period = 14
    Data = Close
    inner = 2*weightedaverage[round(Period/2)](Data)-weightedaverage[Period](Data)
    S = weightedaverage[round(sqrt(Period))](inner)
    
    newuptrend = S[2]>S[1] and S>S[1]
    newdowntrend = S[2]<S[1] and S<S[1]
    
    if not longonmarket and newuptrend then 
     buy at market 
    endif 
    
    if not shortonmarket and newdowntrend then 
     sellshort at market 
    endif
    #72616 quote
    scofield
    Participant
    New

    Merci Nicolas !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

Hull ma automatique


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
scofield @scofield Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by scofield
7 years, 8 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 06/08/2018
Status: Active
Attachments: 1 files
Logo Logo
Loading...