Heikin Ashi 1 h actions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21081 quote
    arcanearcane
    Participant
    Senior

    Bonjour,

    J’ai fait un programme pour les actions sur l’unité de temps 1 H.

    Les entrées sont basées sur l’inversion des bougies Heikin Ashi.

     

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = false // Cumul des positions désactivé
    DEFPARAM PreLoadBars = 2000
    
    ]
    
    
    xClose = (Open+High+Low+Close)/4
    
    if(barindex>2) then
    xOpen = (xOpen[1] + xClose[1])/2
    endif
    
    ca1 = xClose>xOpen and xClose[1]>xOpen[1] AND xClose[2]<xOpen[2] and xClose[3]<xOpen[3] and xClose[4]<xOpen[4]
    
    
    cv1 = xClose<xOpen and  xClose[1]<xOpen[1]  AND xClose[2]>xOpen[2] and xClose[3]>xOpen[3] and xClose[4]>xOpen[4]
    
    
    if ca1 AND Not OnMarket then
    BUY 10000 cash roundedup AT market
    
    endif
    
    if cv1 and Not OnMarket then
    SELLSHORT 10000 cash roundedup  AT market
    
    endif
    
    set target %profit 7
    set stop %trailing 4

     

    Le problème que je ne comprends pas concerne la sortie.

    Le stop est fixé à 4 % pourtant le cours peut perdre 10 % ou plus et la position n’est pas fermée.

    Merci si Nicolas vous pouvez me dire ce qui n’est pas correct.

    #21111 quote
    NicolasNicolas
    Keymaster
    Legend

    Par ce que le trailing ne s’est pas déclenché à priori, puisque le prix n’a pas bougé au préalable favorablement de 4% dans la bonne direction.

    #21123 quote
    arcanearcane
    Participant
    Senior

    Merci Nicolas,

    D’habitude,je suis toujours convaincu de vos réponses mais là je ne comprends pas.

    Si on met un set stop trailing à 4 %, c’est comme si on avait mis un stop à 4 %.

    Peu importe que le prix n’est pas progressé.

    Si ce que j’écris est faux, merci de me le dire, j’arrête la programmation !!!

    #52586 quote
    arcanearcane
    Participant
    Senior

    La réponse était simple.

    Tu ne sors pas du marché à la clôture.

    Si l’action fait un gap dans la nuit, à l’ouverture le lendemain matin, ton stop de 4% n’est pas un stop garanti.

    Ton programme peut fermer avec une perte bien supérieure.

Viewing 4 posts - 1 through 4 (of 4 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

Heikin Ashi 1 h actions


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
arcane @arcane Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by arcanearcane
8 years, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 01/14/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...