Long Waiting
Download scriptThis automated trading script is designed to manage "long" (buying) positions on a daily basis with a specific focus on profit realization and risk management. Below is a breakdown of how the logic operates in plain language:
Core Trading Strategy
The primary goal of this script is to ensure that you have an active long position open for each trading day. It follows a simple "open, monitor, and refresh" cycle:
- Daily Entry: If the script detects that there is no current position open for the day, it will automatically open one.
- Profit Taking and Re-entry: If you already have a position open and it becomes profitable (reaching a user-defined minimum profit level), the script will "fix" your profit by closing that position and immediately opening a new one. This allows you to bank gains while remaining active in the market.
Smart Volume Management
The script includes several layers of protection to ensure your trade sizes are appropriate for your account:
- Dynamic Calculation: It calculates your trade volume based on your current account balance and a "Coefficient" set by you. For example, if you want a specific ratio of margin to capital, the script adjusts the size automatically.
- Liquidity Safety Check: The script checks the specific requirements of the asset you are trading (liquidity rate). If the calculated volume is too high for that specific market's rules, it automatically scales the trade down to prevent errors.
- Hard Caps: You can set a "Maximum Volume" limit. Even if your account balance allows for a massive trade, the script will respect this ceiling to keep your risk controlled.
Timing and Execution Controls
The behavior of the script can be customized based on when you want your positions to refresh:
- Flexible Closing Windows: You can choose between two different "versions" for end-of-day logic. Depending on your selection, the script will look for specific hours (such as 18:00 or 23:00) to evaluate your positions.
- Daily Tracking: The script keeps track of its actions using a date stamp. This ensures it knows when it has already performed its task for the current day so it doesn't create unnecessary duplicate trades.
Summary for the User
This tool is built for traders who prefer a consistent "Long" bias in their portfolio. It automates the tedious work of monitoring profit targets—closing out winning trades and resetting them to keep the momentum going—while simultaneously handling the math behind safe lot sizing and market-specific restrictions.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | L o n g W a i t i n g . m q 5 |
/ / | E t r i d |
/ / | h t t p s : / / w w w . m q l 5 . c o m / r u / u s e r s / e t r i d |
/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
# p r o p e r t y c o p y r i g h t "