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
Written in English in French forum, I transfer the post to English forum (and add it to waiting list of code conversions for assessment)
Oops ! I’m sorry. Excuse me for my mistake.
Sincerely.
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