MetaTrader 5 – TrendLord

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #227574 quote
    ground77600ground77600
    Participant
    Junior

    Hello,

    Please can you create this indicator for PRT ?

    Here is the original topic : https://fxcodebase.com/code/viewtopic.php?f=38&t=73429

    Here is a video of this indicator : https://www.youtube.com/watch?v=wpfk64AnEl4

    Sincerely

    TrendLord.mq5
    #227583 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Written in English in French forum, I transfer the post to English forum (and add it to waiting list of code conversions for assessment)

    #227608 quote
    ground77600ground77600
    Participant
    Junior

    Oops ! I’m sorry. Excuse me for my mistake.

    Sincerely.

    #229352 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Hi,
    Here you have:

    //PRC_Trend Lord
    //version = 0
    //06.03.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    ///inputs
    maperiod = 30 // periods
    smoothedSMA = 1 // calculations with smoothed simple moving average
    mamethod = 1 // method moving average
    src = customclose
    
    SqLength = round(sqrt(maperiod))
    
    maperiod = 30
    maperiod = MAX(maperiod, 1)
    
    if smoothedSMA then
    ///Candle definition
    IF BarIndex = 0 THEN
    bufopen = src
    buflow = bufopen
    bufhigh = bufopen
    bufclose = buflow
    ELSE
    bufopen = bufopen[1] + (src - bufopen[1]) / maperiod
    bufhigh = bufopen
    buflow = buflow[1] + (bufopen - buflow[1])/ Sqlength
    bufclose = buflow
    ENDIF
    else
    ///Candle definition
    bufopen = average[maPeriod,mamethod](src)
    bufhigh = bufopen
    buflow = average[Sqlength,mamethod](bufopen)
    bufclose = buflow
    endif
    
    ///Candle color
    if bufopen>bufclose then
    r=250
    g=0
    else
    r=0
    g=250
    endif
    
    ///Draw candles
    DRAWCANDLE(bufopen, bufhigh, buflow, bufclose)coloured(r,g,0,75)
    
    return 
    
    GraHal thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

MetaTrader 5 – TrendLord


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Iván GonzálezIván González
2 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/07/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...