stopper un trade sous condition

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #225947 quote
    RICOURICOU
    Participant
    Junior

    Bonjour,

    je n’arrive pas a écrire le code qui ferait :

    si après une prise de position longue, à un moment donné il y a 3 bougies rouges consécutives, le trade est stoppé

    et

    si après une prise de position courte, à un moment donné il y a 3 bougies vertes consécutives, le trade est stoppé

    Par avance merci,

    #225953 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Voilà:

    Bullish = close > open
    Bearish = close < open
    Bull3   = (summation[3](Bullish) = 3)
    Bear3   = (summation[3](Bearish) = 3)
    IF LongOnMarket AND Bear3 THEN
       SELL AT MARKET
    ENDIF
    IF ShortOnMarket AND Bull3 THEN
       EXITSHORT AT MARKET
    ENDIF
    #226080 quote
    RICOURICOU
    Participant
    Junior

    Merci beaucoup

Viewing 3 posts - 1 through 3 (of 3 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

stopper un trade sous condition


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
RICOU @ricou Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by RICOURICOU
2 years, 9 months ago.

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