Download N Candles for MetaTrader 5

N Candles

N Candles

This software component for MetaTrader 5 is built to enhance the capabilities of your trading environment. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.

MT5 expert Pack 📂

How to Setup and Use N Candles

1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.

2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.

3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.

4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.

Frequently Asked Questions

Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.

Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.

Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.

Description & Settings


The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The EA checks if the account is netting or hedging. The , , and trade classes are used in the code.
New in version 6
Added types of closure when a "black sheep" is met:

Closing all positions.

Closing positions, which are opposite to the "black sheep".

Closing positions, which are in the same direction as the "black sheep". "Black Sheep"
Suppose, the Expert Advisor searches for 5 identical candlesticks. Then the EA finds five bullish candlestick in a row and opens a Buy position. If the next candlestick after the position opening is not a bullish one, such a candlestick is considered a "black sheep".
Input Parameters

N identical candles which go in a row
- the number of identical candlesticks in a row.

Lot
- position volume.

Take Profit
- take profit value, the parameter is not used if set to 0.

Stop Loss
- stop loss value, the parameter is not used if set to 0.

Trailing Stop
- trailing stop value, the parameter is not used if set to 0.

Trailing Step
- trailing step value, the parameter is not used if set to 0.

Max positions certain direction (only for hedging)
- the maximum allowable number of positions in one direction (only applicable on hedging accounts).

Max position volume (only for netting)
- the maximum volume of open positions (only applicable on netting accounts).

.

Use trade hours
- enable/disable the time filter.

Start hour
- trading start hour.

End hour
- trading end hour.

magic number
- unique EA identifier.

The type of closure at the meeting of the "black sheep"
- select closing type to be applied in case of a "black sheep".
Example of testing on D1 from 2017.04.18 to 2018.02.10 in the Every Tick mode:

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