Download Candle Code for MetaTrader 5

Candle Code

Candle Code

This is a powerful addition to your MetaTrader 5 toolkit designed to optimize market analysis and performance. This technical indicator acts as a specialized analysis tool designed to visualize market data. It helps traders identify emerging trends, momentum shifts, and key support or resistance levels by plotting statistical calculations directly onto price charts.

How to Setup and Use Candle Code

1. Installation: Place your file in the MQL/Indicators folder via "Open Data Folder" and restart your terminal.

2. Loading: Find the indicator in the Navigator, drag it onto your chart, and configure the input parameters in the popup window.

3. Customization: Press Ctrl+I to open the indicator list, select your tool, and click "Properties" to change colors, levels, or visual styles.

4. Updating: Replace the old file in the Indicators folder with the new version and restart the platform to apply changes.

Frequently Asked Questions

Q: Why is my indicator not showing? A: Verify the file is in the MQL/Indicators folder, or try right-clicking the "Indicators" tree in the Navigator and clicking "Refresh."

Q: Do custom indicators slow down the platform? A: Too many complex indicators can impact performance; remove unused ones via the "Indicator List" (Ctrl+I).

Q: Can I use MT4 indicators on MT5? A: No, MQL4 and MQL5 are distinct languages; ensure the indicator is compiled specifically for your platform version.

Description & Settings


Indicator Candle_Code displays in a separate window the "code" of candlesticks as lines built on the ratio of each candle's parameters. Each parameter of one candlestick has its weight within the general view of its candle:

Candlestick body size;

Upper candlestick shadow size;

Lower candlestick shadow size;

Candle direction;

A gap between the adjacent candlesticks (the current one and the previous one).
If the parameter weight exceeds the doubled average range, the value of its weight will be assigned to it; if it does not, then its weight in the general candle view will be its weight multiplied by the parameter range and divided by its doubled average range.
Then, on the data calculated for each candle, a moving average (Weights Data) will be built that displays in the chart the data of all candlesticks available within the history (displaying this line is disabled by default). Then this line is smoothed to display the primary indicator line (Primary MA). The secondary indicator line (Secondary MA) is built by smoothing the primary one.
The indicator has 10 input parameters:

Body size weight
- candlestick body weight;

Upper shadow weight
- upper candle shadow weight;

Lower shadow weight
- lower candle shadow weight;

Candle direction weight
- candle direction (bullish/bearish) weight;

Gap weight
- weight of the distance between the adjacent candles;

Show weights data line
- whether to display the line of the general calculated weight data of each candlestick or no (Yes/No);

First MA period
- period of calculating the first smoothing moving average to be calculated by the line of candlestick weights;

First MA method
- first moving average calculation method;

Second MA period
- period of calculating the second smoothing moving average to be calculated by the data of the first MA;

Second MA method
- second moving average calculation method.
Exemplary calculations of the candlestick body weight:
If Abs(Open-Close) >= Avg(Open-Close)
BodySize = BodyWeight
otherwise
BodySize = BodyWeight * (Abs(Open-Close)) / Avg(Open-Close)
where:
Fig 1. Default weights.
Fig. 2. Candlestick direction weight = 512
Figure 2. Default weights, Show data = Yes

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators