Déclenchement apres lap de temps fixe

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #183152 quote
    FabrissFabriss
    Participant
    New

    Bonjour à tous,

    Je ne trouve pas ma solution sur la programmation de la vente de ma position.

    Je souhaiterais simplement qu’une position ouverte soit vendue automatiquement apres x bougies.

    Si une position s’ouvre automatiquement à 10h, elle se refermera automatiquement à 12h si je demande un temps de base de 4 bougies pour un timeframe 30mn.

    Un grand merci pour votre aide

    #183154 quote
    PepsmilePepsmile
    Participant
    Veteran

    Voilà :

    XbarOut = 4 // à mettre en variable
    
    CondFermerPositions = barindex-tradeindex >= XbarOut
    
    If OnMarket AND CondFermerPositions THEN
    SELL AT MARKET
    EXITSHORT AT MARKET
    ENDIF
    Fabriss thanked this post
    #183207 quote
    NicolasNicolas
    Keymaster
    Legend

    Soit une différence entre le BARINDEX courant et le TRADEINDEX, merci @Pepsmile !

    On aurait aussi pu faire une différence en temps avec l’instruction TIMESTAMP .

    #183301 quote
    FabrissFabriss
    Participant
    New

    Merci beaucoup à tous les deux, c’est exactement ce que je cherchais. 🙂

    Passez une excellente journée

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

Déclenchement apres lap de temps fixe


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Fabriss @fabriss Participant
Summary

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

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