Dealers Trade v 7.91 ZeroLag MACD
Download scriptThis trading algorithm is designed to automate market entries and manage risk using a specialized technical indicator called the ZeroLag MACD. It is primarily intended for use on higher timeframes, specifically the 4-hour (H4) and Daily (D1) charts.
Below is a breakdown of how the logic functions in plain language:
Core Strategy & Market Entry
The script monitors price action through the ZeroLag MACD to determine market direction.
- Buy/Sell Signals: It compares the relative positions of the indicator's lines. When specific crossovers or movements occur, the system identifies a "Buy" or "Sell" condition.
- Reversal Logic: There is an optional setting that allows the script to flip its logic, enabling it to trade against the primary trend if desired.
- Dynamic Lot Sizing: Rather than always trading the same amount, the script can calculate position sizes based on your account balance and a defined percentage of risk per deal.
Position Management & Scaling
The script doesn't just open one trade; it manages a series of positions with specific rules:
- Position Spacing: When opening multiple trades in the same direction, the script ensures they are not opened too close together by enforcing a price "interval."
- Compound Scaling: It includes a coefficient system that can increase the size of subsequent positions as more trades are added to a sequence.
- Take Profit Scaling: The target profit for new positions can also be adjusted dynamically based on how many positions are currently open.
Risk & Safety Features
To protect your capital, the script includes several automated "safety nets":
- Account Protection: If enabled, the system monitors your total open profit. If a specific high-profit threshold is met, it will automatically close out positions to "bank" those gains.
- Stop Loss & Trailing Stop: It supports standard Stop Loss and Take Profit levels. Additionally, it features a Trailing Stop, which moves your protection level in real-time as the market moves in your favor, helping to lock in profits while giving the trade room to breathe.
- Maximum Limits: You can cap the maximum number of open positions and the maximum volume (lots) allowed at any one time.
- Minimum Requirements: The script performs a safety check upon startup to ensure your account balance meets a minimum requirement (e.g., $10,000) before it begins trading.
Technical Integrity
The script handles the "heavy lifting" of trade execution by:
- Automatically checking for correct volume steps required by different brokers.
- Adjusting for 3-digit or 5-digit pricing (pips/points) to ensure accuracy across different broker types.
- Monitoring "slippage" to ensure orders are executed at reasonable prices during high volatility.
Price Data Components
8
Views
0
Downloads
0
Favorites
Dealers Trade v 7.91 ZeroLag MACD
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | D e a l e r s T r a d e v 7 . 9 1 Z e r o L a g M A C D ( b a r a b a s h k a k v n '