Convertir indicateur Supertrend+CCI en stratégie

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

    Bonjour Nicolas,

    j’utilise in indicateur que tu as développé “PRC_Supertrend+CCI ” et je n’arrive pas à le convertir en stratégie, pourrais tu m’aider.

    ci joint le code de l’indicateur.

    Merci,

    //PRC_Supertrend+CCI | indicator
    //06.01.2021
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT5 version
    
    
    // --- settings
    CCIPeriod=50 // CCI indicator period
    ATRPeriod=5  // ATR indicator period
    Level=0 // CCI activation level
    // --- end of settings
    
    
    icci = CCI[CCIPeriod](typicalPrice)
    iatr = AverageTrueRange[ATRPeriod](close)
    TrendUp=0.0
    TrendDown=0.0
    SignUp=0.0
    SignDown=0.0
    
    
    if(iCCI>=Level and iCCI[1]<Level) then
    TrendUp=TrendDown[1]
    endif
    
    
    if(iCCI<=Level and iCCI[1]>Level) then
    TrendDown=TrendUp[1]
    endif
    
    
    if(iCCI>Level) then
    TrendUp=low-iATR
    r=0
    g=255
    if(TrendUp<TrendUp[1] and iCCI[1]>=Level) then
      TrendUp=TrendUp[1]
    endif
    endif
    if(iCCI<Level) then
    TrendDown=high+iATR
    r=255
    g=0
    if(TrendDown>TrendDown[1] and iCCI[1]<=Level) then
      TrendDown=TrendDown[1]
    endif
    endif
    if(TrendDown[1]<>0.0 and TrendUp<>0.0) then
    SignUp=TrendUp
    drawtext("●",barindex,signup,dialog,bold,20) coloured(72,209,204)
    endif
    if(TrendUp[1]<>0.0 and TrendDown<>0.0) then
    SignDown=TrendDown
    drawtext("●",barindex,signdown,dialog,bold,20) coloured(255,140,0)
    endif
    st = max(trendup,trenddown)
    
    
    
    
    return st coloured(r[1],g[1],0) style(line,2) as "Supertrend+CCI"

     

    #219613 quote
    NicolasNicolas
    Keymaster
    Legend

    Change la dernière ligne avec :

    return st coloured(r[1],g[1],0) style(line,2) as "Supertrend+CCI",SignUp as "up signal", SignDown as "down signal"

    et utilise ces signaux pour prendre tes positions (cela correspond aux boules de couleur de l’indicateur).

    RICOU thanked this post
    #219803 quote
    RICOURICOU
    Participant
    Junior

    Bonjour Nicolas,

    pour continuer mon développement de stratégie, peut on mettre un robot en pause pendant 5 mn par exemple après la clôture d’une position?

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

Convertir indicateur Supertrend+CCI en stratégie


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
3 years, 2 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 08/23/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...