Vente à la close

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #255062 quote
    paulPRTpaulPRT
    Participant
    Junior

    Hello,

    je souhaite créer une stratégie qui achète si les deux dernières bougies étaient rouges et qui va vendre à la cloture de la bougie.

    Comment faire ?

    #255066 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Vous ne pourrez pas le faire à la clôture du marché. Le code suivant en donne un exemple (l'entrée et la sortie se font à l'ouverture du marché, sur la barre suivante).

    candleRed=close<open
    
    if candleRed and candleRed[1] and not longonmarket then
       buy 1 contract at market // Next bar open
    else
       sell at market // Next bar open
    endif

    Pour se rapprocher au maximum de la clôture du marché, il faudrait descendre d'une échelle de temps et ajuster sur la dernière bougie de clôture.

    robertogozzi thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Vente à la close


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
paulPRT @paulprt Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
9 months, 3 weeks ago.

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