Simple Open Order script with simple money & trade management feature
Info
The Simple Open Order script with simple money & trade management feature is a Script for MetaTrader 4 that how do traders manage their trades. A common approach is where price reaches profits = the stop loss size, you move the SL to entry price and let the it ride to TP.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use Simple Open Order script with simple money & trade management feature
1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.
2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.
3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.
4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."
Frequently Asked Questions
Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.
Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.
Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.
What this tool does
How do traders manage their trades.
Typical Use Case
This Script excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.
Description & Settings
Related: Open chart - another powerful script for MetaTrader 4 traders.
How do traders manage their trades?
A common approach is where price reaches profits = the stop loss size, you move the SL to entry price and let the it ride to TP.
Also recommended: Open Alert - similar script with strong performance on MetaTrader 4.
While this is a good approach, the disadvantage of this comes when price takes you out after you moved your SL to breakeven cashing you 0 profits before moving to TP. This kind of scenario happens often especially if you take breakout trades, and the retest goes back to your entry price before moving your way.If this is what you have been experiencing, here's another trade management approach:
You have TP1 and TP2. But instead of moving your stoploss, you close 70% of your position at TP1, leave 30% to reach TP2 but you do not move the SL.
For example you take a position with 1 standard lot: SL=20pips, TP1=20pips and TP2=60pips
When price reaches TP1, you close 0.7 lots at 20pips profit, and leave 0.3 lots to hit TP2 at 60pips
The advantage of this is that you will make a 1:0.4 (R:R) profit when you get stopped out after hitting TP1, and a 1:2.1 (R:R) if you hit TP2.
This is a conservative approach to trade management which has its disadvantage which is limiting your Risk:Reward when price goes into your favor.
Default User Inputs:
SL_pips: 20
TP_pips: 60
perc_to_lose: 1
perc_to_close_at_breakeven: 0.7
What the scripts do:
Calculates the lotsize to place based on the account balance, the stop loss (SL_pips) and the %risk (perc_to_lose) set.
Opens 2 position at market order price
If the lotsize calculated is 1 lot, the 2 positions will be open with the first order with 0.7 lots and the second order with 0.3 lots. This is determined by the perc_to_close_at_breakeven.
The 0.7 lot position will close when your profits have reached the number of pips of the SL set. (i.e. TP = SL)
The 0.3 lot position will close at the profit target (i.e. TP_pips)
Example Sell@1.36624)
Order1: Lotsize: 0.3, Bid price@1.36624, Stop loss@1.36824 Take Profit@1.36424 (i.e. 20 pips defined by SL_pips)
Order2: Lotsize: 0.7, Bid price@1.36624, Stop loss@1.36824 Take Profit@1.36024 (i.e. 60 pips defined by TP_pips)
You may also like: Quickly Open Charts with Different Timeframes - excellent alternative for script users on MetaTrader 4.
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.