Breakdown Xonax 2
Download scriptThis script is a comprehensive automated trading engine designed to manage financial positions with a focus on safety, risk management, and precise execution. Below is a breakdown of how the logic functions in non-technical terms:
Core Trading Logic
The engine operates by monitoring price movements and executing trades based on specific predefined rules. It is designed to identify "Buy" or "Sell" opportunities and then manage those positions automatically until they hit specific targets or exit points.
Key Features & Functionalities
1. Smart Risk & Money Management
One of the primary strengths of this script is its flexible approach to trade sizing. It offers two distinct modes:
- Constant Lot: Trading with a fixed, unchanging volume for every transaction.
- Risk Percentage: Automatically calculating the trade size based on a percentage of your account balance. This ensures that the risk taken on any single trade remains proportional to your total capital.
2. Advanced Position Protection (Trailing Stops)
The script includes a sophisticated "Trailing Stop" system. This allows the engine to:
- Lock in Profits: As the market moves in your favor, the script can automatically move your Stop Loss price forward.
- Dynamic Adjustment: It follows the price with a specific "step" and "frequency," ensuring that it doesn't react to every minor fluctuation but stays active enough to protect gains during a trend.
3. Safety & Compliance Filters
To prevent losses from technical issues or unfavorable market conditions, the engine includes several "gatekeeper" checks:
- Spread Protection: It will refuse to open a trade if the difference between the buy and sell price (the spread) is too wide, which helps avoid entering trades during low liquidity.
- Freeze Level Checks: Before placing an order, the script verifies that the requested Stop Loss or Take Profit levels aren't too close to the current price. This prevents "invalid price" errors from your broker.
- Volume Validation: It automatically checks if the trade size you've requested is within the legal limits of the specific asset (not too small, not too large).
4. Execution & Transaction Integrity
The script handles the "handshake" between your computer and the broker very carefully:
- Transaction Tracking: If an order is sent but hasn't been confirmed yet, the script enters a "Waiting" state. It won't try to perform other actions until it knows for sure whether the trade was successful or failed.
- Automatic Reversal/Single Position logic: You can configure the bot to only allow one position at a time or to automatically close an opposite position when a new trade is opened, ensuring your portfolio remains clean and focused.
5. Real-Time Monitoring & Logging
For the user, the script provides high visibility:
- Live Notifications: It can alert you immediately if there are incorrect parameters or if a trade fails to open.
- Detailed Logs: If enabled, it creates a detailed diary of every action, including the exact price, volume, and the specific reason for any success or failure (e.g., "Broker Comment" or "Insufficient Margin").
Summary of Workflow
- Initialization: The script checks your settings, confirms the symbol's rules, and prepares the money management math.
- Scanning: It constantly watches the price. When it sees a signal, it first checks if there is enough money (Margin Check), if the spread is okay, and if the volume is valid.
- Execution: It sends the order and waits for confirmation from the broker.
- Management: Once a trade is live, it constantly monitors the price to "trail" the Stop Loss as profits grow.
- Completion: It closes the position once the target is hit or the safety stop is triggered, then resets to look for the next opportunity.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | B r e a k d o w n X o n a x 2 . m q 5 |
/ / | C o p y r i g h t © 2 0 1 9 , 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 "