Script 1 seul trade par jour

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248306 quote
    Sylvain BernardSylvain Bernard
    Participant
    Junior
    Bonjour, pourrait-on me donner un code pour n’autoriser qu’un seul trade par journée (ou séance). De nombreux sujets ont été postés pour cette problématique mais la réponse n’est jamais claire. Merci d’avance, Grégory
    #248307 quote
    JSJS
    Participant
    Master

    Bonjour,

    C’est une possibilité…

    //Max trades per day
    Once MaxTrades=1
    
    //Reset counter every day
    If IntraDayBarIndex=0 then
    TradeCount=0
    EndIf
    
    //Count trades
    If LongTriggered or ShortTriggered then
    TradeCount=TradeCount+1
    EndIf
    
    //Order conditions
    If myLongCond and TradeCount<MaxTrades then
    Buy 1 contract at Market
    EndIf
    
    If myShortCond and TradeCount<MaxTrades then
    SellShort 1 contract at Market
    EndIf
    
    Set Stop pLoss SL
    Set Target pProfit TP

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

Script 1 seul trade par jour


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 06/16/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...