MetaTrader 5 – TrendLord

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

    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

    #227583 quote
    JC_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
    ground77600
    Participant
    New

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

    Sincerely.

    #229352 quote
    Iván González
    Moderator
    Master

    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.

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ález
1 year, 11 months ago.

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