Bonjour j’ai créé une stratégie initial balance

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #182219 quote
    denis aigdenis aig
    Participant
    Average

    Bonjour j’ai créé une stratégie initial balance il y a longtemps,
    mais il y a un problème il rentre en position vers 1 heure du matin au lieu de rentrer sur cassure du plus haut ou plus bas de la première heure (entre 9 heure et 10 heure).
    Si quelqu’un peut m’aider, merci

    DEFPARAM NoCashUpdate=True
    DEFPARAM CumulateOrders=False
    Hausse =  0.1
    HeureDebut =  090000
    HeureFin =  010000
    
    HeureVente =  173000
    
    condition1 = ( Time >= HeureDebut)
    condition2 = ( Time <=HeureFin)
    
    // initialisation
    ONCE PlusHaut =  0
    ONCE PlusBas =  100000
    
    IF condition1 AND condition2 THEN
    PlusHaut = MAX (PlusHaut, high )
    PlusBas = MIN (PlusBas, low )
    ENDIF
    
    ObjectifLong =  close > PlusHaut + (PlusHaut * Hausse/ 100 )
    ObjectifCourt =  close < PlusBas - (PlusBas * Hausse/ 100 )
    
    condition3 = ( Time > HeureFin)
    condition4 = ( Time < HeureVente)
    
    conditionAchat = condition3 AND condition4
    conditionVente = ( Time >=HeureVente)
    
    REM Achat
    
    IF conditionAchat AND ObjectifLong AND NOT ShortOnMarket THEN
    BUY 1 share AT MARKET
    ENDIF
    
    REM Vente
    
    IF conditionVente AND LongOnMarket THEN
    SELL AT MARKET
    ENDIF
    
    REM Vente à découvert
    
    IF conditionAchat AND ObjectifCourt AND NOT LongOnMarket THEN
    SELLSHORT 1 share AT MARKET
    ENDIF
    
    REM Rachat
    
    IF conditionVente AND ShortOnMarket THEN
    EXITSHORT AT MARKET
    ENDIF
    
    DAX-1-minute.png DAX-1-minute.png
    #182223 quote
    cjr30cjr30
    Participant
    Master

    Je pense que la ligne 5 devrait être 100000

    #182225 quote
    fifi743fifi743
    Participant
    Master

    bonsoir,

    j’ecrirai :

    // initialisation
    ONCE PlusHaut =  high
    ONCE PlusBas = low
    tu ne remet jamais plushaut et plus bas a zero ?
    par exemple en debut de la nouvelle journée
    if IntradayBarIndex=0 then
    PlusHaut =  high
    PlusBas = low
    endif
    #182263 quote
    denis aigdenis aig
    Participant
    Average

    Merci pour vos réponse vous avez raison 🙂
    En plus je vois que mon code n’est pas bien du tout .

    ce que j’aimerais faire c’est:
    1) encadrer le plus haut et le plus bas entre 9 heure et 10 heure.
    2) entrée long si cassure du plus haut et short si cassure du plus bas.
    3) objectif ampleur (haut bas) multiplié par 0.61%
    4) sortie si pas atteint à 12h30
    par exemple

    C’est possible de programmer ça ?
    Merci

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

Bonjour j’ai créé une stratégie initial balance


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
denis aig @denis-aig Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by denis aigdenis aig
5 years ago.

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