HALFTREND PRC 50 nuances

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #28284 quote
    supertitisupertiti
    Participant
    Master

    Bonsoir à tous,

    Voici une nuance de l’indicateur Halftrend PRC, j’ai seulement rajouté une moyenne dont on peut choisir le type ( à savoir que les deux dernières ne fonctionnent pas ) et la période .

    Bons trades

    // HalfTrend PRC  indicator 10.03.2017
    //Nicolas @ www.prorealcode.com Sharing ProRealTime knowledge
    
    lowpricei = Lowest[Amplitude](low)
    highpricei = Highest[Amplitude](high)
    lowma = average[Amplitude](low)
    highma = average[Amplitude](high)
    if barindex>Amplitude then
    if(nexttrend=1) then
    maxlowprice=Max(lowpricei,maxlowprice)
    if(highma<maxlowprice and Close<Low[1]) then
    trend=1.0
    nexttrend=0
    minhighprice=highpricei
    endif
    endif
    if(nexttrend=0) then
    minhighprice=Min(highpricei,minhighprice)
    if(lowma>minhighprice and Close>High[1]) then
    trend=0.0
    nexttrend=1
    maxlowprice=lowpricei
    endif
    endif
    if(trend=0.0) then
    if(trend[1]<>0.0) then
    up=down[1]
    else
    up=Max(maxlowprice,up[1])
    endif
    down=0.0
    else
    if(trend[1]<>1.0) then
    down=up[1]
    else
    down=Min(minhighprice,down[1])
    endif
    up=0.0
    endif
    endif
    if up>0 then
    halftrend = up
    color = 1
    else
    halftrend = down
    color = -1
    endif
    cc = customclose
    ma = average [p,m](halftrend)
    
    return cc as " cc " , halftrend coloured by color as "Half Trend" , ma as " ma ht "
    
    // Variables :
    // Amplitude = 2
    // p = 6
    // m = 2 pondérée
    
    Nicolas thanked this post
    Halftrend-FDR.jpg Halftrend-FDR.jpg
Viewing 1 post (of 1 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

HALFTREND PRC 50 nuances


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
supertiti @supertiti Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/11/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...