Moving Average Trend Block

MA Trend Block - This block is a "conditional block" that is triggered when the trend of the moving average over the period you have defined is validated.

Reminder of the basics

A moving average (or moving average) is an indicator used to analyze the evolution of a time series, removing transient fluctuations in order to highlight longer-term trends. This average is called a moving average because it is recalculated continuously, using a subset of elements in which a new element replaces the oldest or is added to the subset.

There are several types, Kryll supports the following moving averages:

MA: The simple moving average is an unweighted moving average. This means that each day of the data set has the same importance and is equally weighted. At the end of each new day, the oldest data point is removed and the newest is added to the beginning.

WMA: The weighted moving average is similar to MA, except that it adds importance to more recent data points. Each point in the period is assigned a multiplier (the highest multiplier is assigned to the most recent data point and then decreases in order) that changes the weight or importance of that particular data point. Then, just like the SMA, as soon as a new data point is added at the beginning, the oldest data point is eliminated.

EMA: The exponential moving average is very similar to (and is a type of) the WMA. The main difference with EMA is that the old data points never leave the average. To clarify, old data points retain a multiplier (although it decreases to almost nothing) even if they are outside the length of the selected data series.

SMMA: The smoothed moving average compares recent prices to historical prices and ensures that they are weighted and considered equally. The calculation of this indicator does not refer to a specific or fixed time period, but rather uses all available data in the series for analysis. The smoothed moving average differs from the exponential moving average (EMA) in that it is generally used over a longer period.

To learn more we recommend the tutorials on Investopedia and on Tradingview wiki.

Block configuration

In the block parameters you can select the type of average used, the time unit you want to study, the length (number of candles studied) of the moving average and configure the number of trend confirmations you want to see before validating the block.

The different parameters of the Trend block

Moving average type: Here you can specify the type of moving average you want to use: Simple (MA), Exponential (EMA), Weighted (WMA), Smoothed (SMMA).

Lengths: Specify here the length of your moving average. This is the number of candles that will be used for its calculation.

Time Unit: You can specify the Time Unit of the moving average on which you want the block to operate (ranging from minutes to months).

Source: Specify here the source of the candle data among the different options.
- Closing: Instantaneous value when the candle is closed.  
- Opening: Instantaneous value when the candle opens
- Highest: Highest value of a candle
- Lowest: Lowest value of a candle
- hl2: Average between highest and lowest value of a candle
- hlc3: Average between highest, lowest and closing
- ohlc4: Average between opening, highest, lowest and closing

Length: Allows you to set the length (number of candles taken into account) for the calculation of the Moving Average.

Trend type: Here you specify the type of trend you want to identify. Either upward (the values of the moving average only go up, the trend is called bullish) or downward (the values of the moving average only go down, the trend is called bearish)

Trend confirmations: You choose through this parameter the number of confirmations needed to validate the up or down trend. This number represents the number of successive values you want to see rise or fall before confirming the trend. This parameter induces a delay but is particularly useful to filter out false signals in periods of uncertainty / range.

Behavior at initialization: Here you can define the behavior of the block at its initialization. You can either wait for the current candle to close (option "Wait for next close"), or instantly evaluate the block conditions on the last closed candle (option "Evaluate immediately"). This last option is particularly useful to perform analysis on several time units in parallel or to analyze an indicator on a macroscopic time unit (12H / Daily / Weekly...) without blocking the strategy by waiting for a candle to close.

Do not hesitate to join us on our Telegram and Discord groups as well as our other social networks to share your opinion and your feedback on the platform.

Happy Trading,

Website :
Twitter :
Telegram EN :
Telegram FR:
Telegram ES:
Discord :
Facebook :
Support :

Author image

About MonsieurK

Is there a POAP for everything ?