Hull Stratégie utilisant 2 TF différents

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #199820 quote
    wtangsiri
    Participant
    Junior

    Bonjour Nicolas,
    Pouvez vous m’éclaircir sur ce sujet svp
    J’utilise l’indicateur HULL avec 2 timeframes différents (5 Minutes (Défaut) et 30 minutes)
    Mon programme achète même lorsque mon HULL 30 minutes est Rouge (et non Vert comme veut le programme)
    Not ( My30MnHULL > My30MnHULL[1] )
    D’où vient ce problème ?

    defparam cumulateorders=false
    Once MyHullPeriod = 20
    
    TimeFrame(30 Minutes)
    //-----OHLC-----
    My30MnOpen = Open
    My30MnHigh = High
    My30MnLow = Low
    My30MnClose = Close
    //-----OHLC-----
    
    TimeFrame(Default)
    //-----OHLC-----
    MyOpen = Open
    MyHigh = High
    MyLow = Low
    MyClose = Close
    //-----OHLC-----
    
    //----- HULL (30 Minutes) -----
    My30MnInner = 2*weightedaverage[Round(MyHullPeriod/2)](My30MnClose)-weightedaverage[MyHullPeriod](My30MnClose)
    My30MnHULL = weightedaverage[Round(sqrt(MyHullPeriod))](My30MnInner)
    //Uptrend Bullish
    If My30MnHULL > My30MnHULL[1] then
    My30MnHULLisGreen = 1
    Else
    My30MnHULLisGreen = 0
    Endif
    
    //----- HULL (Default) -----
    MyInner = 2*weightedaverage[Round(MyHullPeriod/2)](Close)-weightedaverage[MyHullPeriod](Close)
    MyHULL = weightedaverage[Round(sqrt(MyHullPeriod))](MyInner)
    //Uptrend Bullish
    If MyHULL > MyHULL[1] then
    MyHULLisGreen = 1
    Else
    MyHULLisGreen = 0
    Endif
    
    If My30MnHULLisGreen then
    If MyClose > MyHULL then
    Buy 1 LOT AT Market
    Endif
    Endif
    
    If Not MyHULLisGreen then
    Sell At Market
    Endif
    #199859 quote
    JC_Bywan
    Moderator
    Master

    Bonjour, code ci-dessus édité par la modération pour le mettre au format correct. Si ce n’était pas une omission mais une absence de bouton “insert PRT code” dans la barre d’outil, voici comment le faire revenir jusqu’à l’arrivée de la nouvelle version du site ProRealCode, qui devrait résoudre ce problème:

    Merci de compléter la requête via capture écran montrant un exemple de cas d’achat malgré Hull 30 minutes rouge, avec ajoutée une fenêtre “graph my30mnhullisgreen”, qui incitera davantage les autres membres à se pencher sur la question.

    wtangsiri thanked this post
    #199942 quote
    Nicolas
    Keymaster
    Master

    Le calcul de ta moyenne de hull 30 minutes doit se faire sous l’instruction TIMEFRAME(30 minutes) et non dans un autre timeframe comme tu le fais !

    N’oublie pas que tu peux utiliser l’instruction GRAPHONPRICE pour visualiser des variables sur un graphique de prix lors d’un backtest.

    wtangsiri thanked this post
    #200016 quote
    wtangsiri
    Participant
    Junior

    Merci beaucoup Nicolas et JC_Bywan
    Je ferais Insert PRT Code la prochaine fois (Ctrl F5) et j’utilise GraphOnPrice pour tester les variables

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

Hull Stratégie utilisant 2 TF différents


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
wtangsiri @wtangsiri Participant
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 08/29/2022
Status: Active
Attachments: No files
Logo Logo
Loading...