Signaux erronés crées par Probacktest

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #182221 quote
    carlvancarlvan
    Participant
    Average

    Bonjour,

    J’essaie de tester une stratégie (sur PRT dernière v 11.1 oct 2021) et constate que les signaux générés durant le backtest ne devraient pas exister:

    Ici, la stratégie est basée sur un histogramme HeikinAshi. Le signal d’achat est donné lorsque:

    1. l’indicateur est > 0
    2. high < high[1] dans ce cas, on achète la barre suivante si elle excède le récent plus haut (et on sort lorsque l’indicateur repasse sous 0, et qu’ensuite on a un low plus bas que le low précédent)

    Donc, le code:

    HaClose = exponentialaverage[3]((Open+High+Low+Close)/4)
    if(barindex>2) then
    HaOpen = (HaOpen[1] + HaClose[1])/2
    else
    Haopen=HaClose
    endif
    
    Histog = haclose - haopen
    
    bull= histog>0 and high < high[1]
    bear= histog<0 and low > low[1]
    
    if not longonmarket and barssince(bull) <=3 and histog>0 then
    buy 1 contract at highest[3](high) + 0.1 stop
    endif
    if longonmarket and histog <0 then
    sell at low -0.1 stop
    endif

     

    J’ai attaché le graphe du Nasdaq en 2 minute: plein de signaux incohérents et j’en illustre 3 ici: à chaque fois on voit une entrée “long” alors que le high ne dépasse pas le récent plus haut, donc il ne devrait pas y avoir d’entrée.

    J’avoue que c’est un mystère pour moi – j’aimerais recevoir de l’aide ici.

    Merci d’avance,

    Carl

    Nasdaq.jpg Nasdaq.jpg
    #182244 quote
    NicolasNicolas
    Keymaster
    Legend

    Si tu graph ta condition “barssince(bull) <=3 and histog>0″, est-elle valide au moment des entrées ?

    Si oui, alors vérifie pourquoi chaque variable est OK, à savoir dernier signal “bull” récent (moins de 4 bougies) et “histog” positif.

    #182260 quote
    carlvancarlvan
    Participant
    Average

    Non, tout est correct. J’ai encore simplifié les conditions pour éliminer le “barssince”, comme suit:

    HaClose = exponentialaverage[py]((Open+High+Low+Close)/4)
    if(barindex>2) then
    HaOpen = (HaOpen[1] + HaClose[1])/2
    else
    Haopen=HaClose
    endif

    //HaHigh = Max(high,max(haclose,haopen))
    //HaLow = Min(Low,min(HaClose,HaOpen))

    Histog = haclose – haopen
    //Histav= weightedaverage[3](histog)
    bull= histog>0 and high < high[1]
    bear= histog<0 and low > low[1]

    if not longonmarket and bull then
    buy 1 contract at highest[3](high) + 0.2 stop
    endif
    …/

    Or, voir graphe attaché, à 21h58, j’ai un achat exécuté alors que la bougie ne va PAS plus haut que le “highest high” manifesté 2 bougies plus tôt. C’est à s’arracher les cheveux 😉

    Nasdaq-1.jpg Nasdaq-1.jpg
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

Signaux erronés crées par Probacktest


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
carlvan @carlvan Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by carlvancarlvan
4 years, 10 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/24/2021
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...