Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Candle_Code - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Candle_Code - indicator for MetaTrader 5

Candle_Code - indicator for MetaTrader 5

Candle_Code - indicator for MetaTrader 5

The indicator Candle_Code displays the "code" of the candlestick as a line built based on the ratio of each candle parameter in a separate window. Each parameter of a candle has its weight in the overall view of its candle:

If the parameter weight is outside the double average range, it is assigned its weight value; if not, its weight in the general candle view will be its weight times the parameter range divided by its double average range.

Then, based on the data calculated for each candle, a moving average (weighted data) is constructed, displaying data on the chart for all available candles in the history (the display of this line is disabled by default). This line is then smoothed to show the main indicator line (Main MA). The secondary indicator line (minor MA) is built by smoothing the primary indicator line.

The indicator has 10 input parameters:

Example calculation of candlestick weight:

If Abs(open-close) >= Avg(open-close)

 Abs(open-close) = absolute size of the candlestick body Avg(open-close) = average size of the candlestick body during the historical data period BodyWeight = candlestick weight defined in the parameters 

Candle_Code - indicator for MetaTrader 5

Figure 1. Default weights.

Candle_Code - indicator for MetaTrader 5

Figure 2. Candlestick direction weight = 512

Candle_Code - indicator for MetaTrader 5

Figure 2. Default weights, show data = yes


Attachment download

📎 candle_code.mq5 (23.37 KB)

Source: MQL5 #21021

Verification code Refresh