TrendEnvelop – Changement de direction

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #208022 quote
    finplusfinplus
    Participant
    Master

    Bonsoir,

    impossible d’insérer le code dans la fenêtre prévue à cet effet. Donc, je le copie ci dessous.

    // Conditions pour ouvrir une position acheteuse
    
    timeframe (4 hours)
    
    /////////////////////////////// Trend Envelopppes
    
    timePeriod=14
    Deviation=0.1
    
    price1=customclose
    
    dsma = WeightedAverage[timePeriod](price1)
    
    valuesHigh = (1 + deviation / 100) * dsma
    valuesLow = (1 - deviation / 100) * dsma
    
    inputs=price1
    
    if (inputs > valuesHigh)then
    trend = 1
    elsif (inputs < valuesLow) then
    trend = -1
    endif
    
    if (trend > 0) then
    if ( valuesLow < valuesLow[1]) then
    valuesLow = valuesLow[1]
    endif
    if trend[1]>0 then
    outputs0 = valuesLow
    outputs1 = valueshigh
    endif
    else
    if (valuesHigh > valuesHigh[1]) then
    valuesHigh = valuesHigh[1]
    endif
    if trend[1]<0 then
    outputs1 = valuesHigh
    outputs0 = valueslow
    endif
    endif
    
    TrendEnvelopUp4h = outputs0
    TrendEnvelopDn4h = outputs1
    
    signal = 0
    if not TrendEnvelopUp4H[1] and TrendEnvelopUp4h then
    signal = 1
    endif
    if not TrendEnvelopDn4h[1] and TrendEnvelopDn4h then
    signal = -1
    endif
    
    screener [signal<>0](close as "close")

     

     

    mon problème : j’ai tenté d’écrire un screener me renvoyant les valeurs dont le code recopié (merci encore à Nicolas) change de direction. Sauf que les informations restituées ne correspondent pas aux attentes.

    quelqu’un peut-il me dire où est le problème?

    Merci d’avance.

    #208042 quote
    NicolasNicolas
    Keymaster
    Legend

    Sur quel timeframe utilises tu le code du screener ? Dans l’immédiat, je te dirai de supprimer la ligne n°3 avec l’instruction TIMEFRAME, car ici les infos sont récupérés sur le TF 4-heures.

    #208124 quote
    finplusfinplus
    Participant
    Master

    Bonjour,

    je l’utilise sur le timeframe “4 heures” mais je vais supprimer l’information dans le corps du code.

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

TrendEnvelop – Changement de direction


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by finplusfinplus
3 years, 8 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 01/23/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...