Trend Lord Indicator

Trend Lord Indicator

The Trend Lord indicator is a visual tool that enables traders to identify trends more intuitively by using custom candles. Unlike traditional candles, this indicator colors the candles according to the trend direction, making it easier to spot shifts or consolidation in price movements.

This article will guide you through the setup of the Trend Lord indicator and show you how to adjust its parameters to optimize it for your analysis needs. At the end, you’ll find the code required to implement it in ProRealTime.

1. Parameter Calculation and Configuration

The Trend Lord indicator structure includes several key parameters that control the behavior and visualization of the candles on the chart. These parameters affect aspects like the moving average calculation period and the smoothing method.

a) Moving Average Period (maperiod)

The maperiod parameter defines the number of bars used to calculate the moving average. This value determines the indicator’s sensitivity to price changes. A lower maperiod will make the indicator respond faster to price movements, while a higher value will reduce noise and highlight stronger trends only. This value is set to always be at least 1 in the code to avoid calculation errors.

b) Smoothed Moving Average (smoothedSMA)

The smoothedSMA parameter allows the use of a smoothed simple moving average. Enabling this option results in a smoother candle transition, which visually reduces volatility in the indicator. This is especially useful for those who prefer a cleaner look and like to identify trends with less abrupt movements.

c) Moving Average Method (mamethod)

This parameter defines the calculation method of the moving average applied in the indicator. Changing the mamethod allows trying different approaches and choosing the one that suits the market or asset being analyzed. ProRealTime offers various options for calculating moving averages, including simple and exponential, which can be applied in the code.

2. Defining Custom Candles in the Trend Lord

The Trend Lord indicator uses a unique approach to define its own “candles” based on average open, high, low, and close values, calculated according to the moving average and other parameters:

  • bufopen: Determines the open price of each candle. It is calculated accumulatively using the src value (which refers to the custom close).
  • bufhigh: Represents the candle’s high price, equal to the bufopen value.
  • buflow: Calculates the low price of each candle, smoothed using the SqLength value, which is the square root of maperiod.
  • bufclose: Represents the close of each candle, set equal to the buflow value.

This custom calculation of the candles allows an alternative visualization of prices, where each candle behaves more fluidly than a traditional price candle.

3. Candle Colors According to Trend

A primary feature of the Trend Lord indicator is its color-coding of candles based on the trend direction:

  • Green candles: Displayed when the open price (bufopen) is higher than the close price (bufclose). This indicates a potential bullish trend.
  • Red candles: Displayed when the close price is higher than the open, suggesting a bearish trend.

This color-coding allows a quick visual interpretation of the trend, making it easy to identify the direction and potential changes. The candle color is a simple yet powerful representation, helping traders focus on the general price movement.

4. Implementing the Code in ProRealTime

Below is the code necessary to implement the Trend Lord indicator in ProRealTime. This code is written in the ProBuilder language, which is specific to the ProRealTime platform.

This code defines the visual characteristics of the indicator. Each custom candle is calculated based on the type of moving average and smoothing method selected by the user. By changing the parameters maperiod, smoothedSMA, and mamethod, the user can adapt the indicator to their specific needs, adjusting the sensitivity and smoothness of the candles.

5. Conclusion and Usage Tips

The Trend Lord indicator is a valuable visual tool for detecting trends in financial markets. By employing a custom candle representation, it facilitates the identification of trend reversals and enables a focus on the general direction of price movements.

Usage Tips:

  • Adjust maperiod based on the timeframe: If trading on short-term charts, consider reducing the period to capture quick changes. On long-term charts, a higher maperiod can help identify predominant trends.
  • Try different moving average methods: Changing mamethod allows experimenting with different calculation styles, which can provide alternative trend perspectives.
  • Use smoothed candles: Enabling smoothedSMA can reduce visual volatility, ideal for those who prefer stable and easy-to-interpret charts.

This indicator is especially useful in trending markets and less effective in sideways ranges, where color changes might occur frequently without indicating a clear trend. Like any other indicator, Trend Lord should be used as a complement to other technical analysis tools for more accurate results.

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar
Related users ' posts
P. Marlowe Muy bueno. ¿Podría hacerse para señalar extremos por el lado bajista? Lo mismo a la inversa....
Miro Esta es una versión del indicador, para ambos extremos. //-------------------------------...
P. Marlowe Muchas gracias ¡¡
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
roccafragius Hello Ivan, very good job! May I ask you to translate teh script from TradingView named Tre...
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
Regisnew très bel indicateur merci
jordan //---settings MAmode=0 Period=150 NumberOfMA=100 //---end of settings MA2=undefined ...
jordan dites moi si cela correspond à ce que vous cherchez
kats bonjour merci de ta reponse mais non ca fonctionne pas sympa quand même d'avoir essayé cdlt
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
kats Bonjour, J'ai une question etes vous trader? Je m'explique , j'ai téléchargé tous les indi...
Faisalx Hola Ivan. Thanks for your great job. I would appreciate if you have look at my request http...
roccafragius Thank you for all these useful information!! Very great job Ivan! THank you so much
geroniman Merci Ivan, super travail. On peut toujours compter sur toi pour apporter des innovations su...
Stenozar Ciao mi restituisce errore line 1; forse è perchè utilizzo la versione 11 ? in questo caso d...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
Iván perfect!
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
7 months ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Bernard13 (Je réécris mon commentaire -français- en français car certains mots ne correspondaient pas ...
Iván 1000 indicateurs !!! brutaux
Lean Me parece muy buen indicador, y se complementa muy bien en mi sistema, ¿podrías crear un scr...
Iván Gracias! Para el screener sólo tienes que copiar el indicador y poner como condición de búsq...
Lean Muchas gracias Iván, ya lo he podido crear.
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
Iván
9 months ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...

Top