Obtenir le prix d’entrée

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

    Hello je cherche à faire un code qui me donnera suite à un achat au marché, mon prix d’achat dans une variable.

    J’ai tenté d’utiliser “price” mais cela ne fonctionne pas

    Une idée de comment faire ?

     

    Defparam cumulateorders = False

    aujourdhui = aujourdhui

    //Englobante rouge -> vert
    If close[1] < open[1] and open[1] < close and close[1] > open then
    aujourdhui = dayofweek
    buy 1 share at market
    PrixAuMarche = price //point bloquant
    DistanceStop = PrixAuMarche – lowest[1]
    set stop ploss lowest[1]
    set target pprofit DistanceStop + PrixAuMarche
    endif

    #244645 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Bonjour,

    TRADEPRICE

    Avec l’instruction tradeprice qui stocke les niveaux d’entrée ou de sortie, tu peux le faire. Etant donné que ton éxécution se fait à l’open de la bougie qui suit l’envoi d’ordre, tu peux faire PrixAuMarche = tradeprice non pas à la clôture de bougie où tu envoies le buy mais à la clôture de la bougie suivante puisque ce tradeprice ne commence à exister qu’à son open.

    Iván González and 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

Obtenir le prix d’entrée


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
paulPRT @paulprt Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JC_BywanJC_Bywan
1 year, 6 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/04/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...