Inserted Code
/*==================================================================== GlobalLineCloser: One line closes all my trades Version: 1.05 Platform: MT4 Type: Free EA — Visual Global Exit Manager ====================================================================== THE PROBLEM ───────────────────────────────────────────────────────────────── You have 5 positions open. Maybe 10. Price is approaching your mental exit level. Now you're clicking. Closing. One by one. Too slow. Too stressful. Slippage eats your edge. I built this EA because I got tired of that. THE SOLUTION ───────────────────────────────────────────────────────────────── One draggable line on the chart. Price touches it → all my trades close. Instantly. That's the entire idea. No entries. No signals. Just one clean global exit. HOW IT WORKS ───────────────────────────────────────────────────────────────── [1] Two buttons appear: SET TP (blue) + SET SL (red) [2] Click one → a draggable line spawns on the chart [3] Drag it anywhere you want [4] Price hits it → every open trade with your MagicNumber closes [5] Click button again → line disappears (toggle) One line. All trades. Done. WHAT YOU SEE ON THE CHART (v1.05) ───────────────────────────────────────────────────────────────── + Text attached to the line: "TP at 1.23456 / +45.3 Pips from Buy" + Pip labels in the right margin — follow the line as you drag + Tooltips everywhere — hover and see the same info + Smooth updates — 200ms refresh, no lag INPUT PARAMETERS ───────────────────────────────────────────────────────────────── --- Core --- MagicNumber = 123456 Which trades to close Slippage = 3 Max slippage in points --- Display --- ShowPipLabels = true Pip labels in margin ShowAttachedText = true Text on the line itself --- Colors --- TP_Color = DodgerBlue SL_Color = Crimson LabelFontSize = 10 --- Positioning --- LabelShiftBars = 3 Margin label offset TextAnchorBar = 2 Attached text anchor --- Object Names (optional) --- TP_Line_Name = Global_TP SL_Line_Name = Global_SL TP_Button_Name = Btn_Global_TP SL_Button_Name = Btn_Global_SL TP_Label_Name = Lbl_Global_TP SL_Label_Name = Lbl_Global_SL SMART BEHAVIORS ───────────────────────────────────────────────────────────────── + Toggle — click button to create line, click again to remove + Auto-hide — pip labels disappear when no trades exist + Symbol-locked — only closes trades on current chart + Clean removal — all objects deleted when EA removed + Retry logic — failed closes retried 3× automatically + Orphan cleanup — delete line manually, labels clean up too INSTALLATION ───────────────────────────────────────────────────────────────── [1] Copy GlobalLineCloser.mq4 into MQL4/Experts/ [2] Restart MT4 or refresh Navigator [3] Drag onto chart [4] Set your MagicNumber [5] Click SET TP or SET SL — done IMPORTANT ───────────────────────────────────────────────────────────────── ! This EA does NOT open trades — only closes ! Works on Buy + Sell market orders only ! TP triggers: Bid ≥ line / SL triggers: Ask ≤ line ! Test on demo first CHANGELOG ───────────────────────────────────────────────────────────────── [1.05] + Added: Attached text labels on lines + Added: Tooltip sync + Added: 200ms smooth refresh * Fixed: Colors update on input change * Fixed: Orphan label cleanup [1.04] + Added: Right-margin pip labels + Added: ShowPipLabels toggle [1.03] + Added: Configurable object names + Added: Auto chart shift [1.02] * Fixed: Retry logic (3 attempts) * Fixed: RefreshRates() on close [1.01] + Added: Toggle behavior + Added: Auto-hide labels [1.00] + Initial release LICENSE ───────────────────────────────────────────────────────────────── Free for personal use. No warranty. Test on demo first. ======================================================================*/
DOWNLOAD
Attached File(s)