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
supertiti Bonjour Nicolas, Je ne comprend pas bien , le trend change de couleur quand les prix sont a...
Nicolas Oui ce serait possible, cependant l'indicateur est bien prévu pour conserver la couleur de l...
supertiti Quand tu pourras si tu peux nous coder la troisième couleur cela améliorerait les trades cou...
Nicolas How to import file page: in the help section of the website explains howto
kenssa import through the indicator page/window in the Proreal time
chicoteca Buenas, no consigo que se me muestre en el chart de DAX. ¿Cómo procedo? Gracias.-
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
Alessandro Furlani Hi Ian, hope you still use PRT and so you can read this post. I have tested a lot your work ...
Stockastiss Can this code be simply transferred into Backtestingcode so one doesnt need to use call ? (i...
Vonasi Sorry for the late reply. Add the code to your strategy and remove line 5 and line 39. Chang...
viktorthunss Hi! How many averages are there? Can I see the somewhere?
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
leofi https://www.prorealcode.com/topic/simple-average-with-visual-color/
leofi Go visit www.prorealcode.com/topic/simple-average-with-visual-color/ and watch 2em post
Dritan Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate wind...
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Globalmarkets79 Thank you Vonasi for the answer. I have an other question. When i tried to run the indicator...
Vonasi Lines is either 0 or 1 to turn on or off the drawing of them. Once again if you download and...
Globalmarkets79 Thank you Vonasi, this indicator is very helpful!!!
Nicolas
6 years ago
Bateson Merci pour la réponse Nicolas. C'est bien ce que j'ai fait mais ça ne fonctionne toujours pa...
Enzo Paliotti Veramente ottimo, era quello che cercavo, si potrebbe modificare inserendo come variazione a...
Nicolas Perché no, chiedetelo con una descrizione dettagliata nel forum degli indicatori, per favore!
Nicolas
6 years ago
LRMA
LRMA
0
Indicators
jiddan78 how to convert to afl amibroker ?
Nicolas We do not supply free coding assistance for AFL Amibroker on the website. You can ask for pa...
Ngomsi @ Vonasi, how to use timeframe , 13 minutes ,21 minutes, 34 minutes,et 55 minutes with this...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...

Top