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 avatar avatar avatar avatar
Related users ' posts
Nicolas change the last line with: return v coloured(r,g,b) style(line,2), v+band coloured(168,168,1...
Paolo.B Thanks ... works as i wanted.
Kanamax Bonjour Nicolas, comme Paolo.B je souhaiterais utiliser cette indicateur au sein d'un code. ...
zilliq Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don't know why, it doe...
Suzu Yuk He is right. MT and mavgMT are not defined and causing errors.....
Roland57800 Bonjour Noobywan, si je comprends bien l'utilisation de ce code que je trouve particulièr...
Noobywan Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en am...
Fabian This Code draws only a retangle if the condition has been confirmed and NOT before (in that ...
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
simmerseb Bonjour, merci beaucoup pour cet indicateur je le trouve très clair et pertinent.
fazel53 How do i attach this indicator to my mt5 platform?
Nicolas You can't! All indicators here are for ProRealTime trading platform: https://www.prorealtime...
Nicolas c'est exactement ce que je fais entre les lignes 58 et 64 pour pouvoir tracer la ligne complète
Italo Fabian Nicolas, Ces matrices sont-elles des vecteurs unidimensionnels ou multidimensionnels? Depu...
Denis Bonjour Nicolas et RicLg, Merci Nicolas pour cet indicateur intéressant et merci RicLg pour...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Nicolas Il faut l'ajouter sur le prix avec l'icône de la clé situé en haut à gauche du graphique du ...
jerome777 merci de ta réponse
jerome777 bonjour c est bon il fonctionne parfaitement merci beaucoup
Guillaume Mcm I gave the above message fix ;)
Tradingrob Is it possible to put the itf-file in the right way here in Prorealcode? so the right 'trend...
Guillaume Mcm Update link ;) https://www.prorealcode.com/topic/trend-histogramme-cci-mise-a-jour-suite-...
Screw27 Hi man, I installed the indicator and i don't know why but my graph it is so big
HelixKing sounds interesting I'll take a look
Godo Bonjour Souhait Sam, Après de nombreux essais pour le mettre en format afin d'utiliser ce c...
Nicolas Il faut supprimer celles qui existent dans la fenêtre d'optimisation et les créer en dur dan...
crusoe76 hi there, anyone can help making this strategy work, i have a message saying replace variabl...
Screw27 Salut nicolas j'aimerais savoir tes résulats grace a cettte methode
eva.g.forsgren It dose not work, I get a strap instead of candels???????????????????????????????????????????
Nicolas That indicator is the one below the chart. The indicator to put on the price chart is this o...
pyhrus P.S : IG , que j'ai contacté ,m'indique que la version V11 , ne sera pas disponible avant un...
Hasardeur Dear Nicolas, is there someting at the arry to modify in order to run the trend at the actu...
MALIMALO Dear Nicolas, just try touse your indicator with backtest but it's not working. is anybody...
ribes65 Bonjour Nicolas, Merci pour votre travail. Est-il envisageable de créer un screener pour ...
Nicolas Bien sûr, merci de formuler une demande dans le forum des screeners pour prorealtime. En res...
ipbvba Est il possible de le transformer en indicateur (pour ne plus avoir les lignes mais uniqueme...

Top