Stop-loss suiveur escalier

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #188007 quote
    leianleian
    Participant
    New

    Bonjour,

    J’ai cherché dans la librairie des indicateurs ProRealCode et sur le forum un indicateur stop-loss suiveur sur le principe de l’escalier: on remonte le stop sous chaque plus bas (deep) validé par un plus haut, comme indiqué sur la capture ci-joint

    [attachment file=”188008″]

    J’ai été très étonné, bien que cette approche me semble assez populaire et répandue dans la littérature, de ne pas avoir trouvé cet indicateur. (la majorité des indicateurs de S/L étant basés sur ATR)

    Du coup je me demande si un indicateur en escalier tel que décrit existe déjà, (dans ce cas je veux bien le lien),  et sinon, pourquoi ? (il y a sûrement une bonne raison pour laquelle les indicateurs basés sur ATR sont + populaires que la méthode en escalier décrite ci-dessus)

    Merci d’avance pour vos éclairages

    Capture-décran-2022-02-10-à-15.09.07.png Capture-décran-2022-02-10-à-15.09.07.png
    #189284 quote
    KhaledKhaled
    Participant
    Veteran

    Tiens, essayes ça

    DEFPARAM CUMULATEORDERS = FALSE
    
    TIMEFRAME(1 hour)
    ca1 = 0
    cv1 = 0
    
    CA1 = close>open and close>open[1] and close > close[1] and close>Supertrend[2,6]
    CV1 = close<open and close<open[1] and close < close[1] and close<Supertrend[2,6]
    
    
    IF NOT LongOnMarket AND ca1 THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF
    IF NOT ShortOnMarket AND cv1 THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    ENDIF
    
    If LongOnMarket AND cv1 THEN
    SELL AT MARKET
    ENDIF
    IF ShortOnMarket AND ca1 THEN
    EXITSHORT AT MARKET
    ENDIF
    
     
    
    IF NOT ONMARKET THEN
    newSLL=0
    newSLS=0
    ENDIF
    
    IF LONGONMARKET THEN
    newSLL = Low[1]
    ENDIF
    
    IF SHORTONMARKET THEN
    newSLS = High[1]
    ENDIF
     
    
    IF longonmarket and newSLL>0 THEN
    SELL AT newSLL STOP
    
    ENDIF
    IF shortonmarket and newSLS>0 THEN
    EXITSHORT AT newSLS STOP
    ENDIF
     
    GRAPH newSLL as "SLL"
    GRAPH newSLS as "SLS"
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

Stop-loss suiveur escalier


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
leian @leian Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by KhaledKhaled
4 years, 9 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 02/10/2022
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...