N Candles v3
Download scriptThis script is an automated trading tool designed for the MetaTrader 5 platform. Its primary function is to monitor price movements and execute trades based on a specific pattern of consecutive "identical" candles.
Core Trading Logic
The tool operates by looking at a sequence of recent candles to identify a trend. It focuses on identifying:
- Bullish Sequences: A series of "Bull" candles (where the closing price is higher than the opening price).
- Bearish Sequences: A series of "Bear" candles (where the closing price is lower than the opening price).
The user can define exactly how many consecutive candles of the same type are required to trigger a trade. For example, if set to 3, the script will look for three identical bullish or bearish candles in a row before taking action.
Key Features and Functionalities
- Automated Execution: Once the candle pattern is identified, the script automatically opens Buy or Sell positions. It includes logic to ensure that trades are only opened if there is enough available volume/margin to cover the trade.
- Risk Management Tools:
- Take Profit (TP): Automatically sets a target price to lock in profits.
- Stop Loss (SL): Automatically sets a safety net to limit potential losses on every trade.
- Trailing Stop: A dynamic feature that "follows" the price as it moves in your favor. It adjusts the stop loss level automatically to protect gains, moving only when the price reaches a specific "step" or distance.
- Position Limits: The tool allows users to set a maximum number of open positions in a single direction (Buy or Sell). This prevents the script from opening an unlimited number of trades at once, helping to manage overall risk exposure.
- Smart Adjustments: The script automatically detects the precision of different currency pairs (e.g., 3-digit vs. 5-digit brokers) and adjusts your profit and loss settings accordingly to ensure they are calculated correctly regardless of the asset traded.
Summary of Workflow
- Monitor: The script constantly watches new candles as they form on the chart.
- Analyze: It checks if the last $N$ candles match the same direction (all up or all down).
- Verify: It checks if there is enough balance to trade and if the maximum position limit hasn't been reached.
- Trade: It opens the trade with predefined Take Profit, Stop Loss, and Trailing Stop parameters.
- Manage: It actively updates the Trailing Stop as the market fluctuates to secure potential profits.
Price Data Components
8
Views
0
Downloads
0
Favorites
N Candles v3
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | N - _ C a n d l e s _ v 3 . m q 5 |
/ / | C o p y r i g h t © 2 0 1 7 , V l a d i m i r K a r p u t o v |
/ / | h t t p : / / w m u a . r u / s l e s a r / |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "