Compile logCompiled
MetaEditor build 2425 · MT4 · 1 Dec 2026, 10:21 UTCcompiling FXN_PendingStraddle.mq4✓ Result: 0 errors, 0 warnings, 4 soutput FXN_PendingStraddle.ex4 · 38 KBsha256 d4b83a38304f65fc…db3cc5b3
Files version 1.0
| File | Lines | Size |
|---|---|---|
| FXN_PendingStraddle.mq4 | 656 | 22 KB |
| FXN_PendingStraddle.ex4 compiled by the Lab | – | 38 KB |
FXN_PendingStraddle.mq4656 lines
//+------------------------------------------------------------------+//| FXN_PendingStraddle.mq4 |//| FXNook Lab Hub starter library - MIT licence |//| https://lab.fxnook.com/hub |//+------------------------------------------------------------------+#property copyright "FXNook Lab (MIT licence)"#property link "https://lab.fxnook.com/hub"#property version "1.00"#property description "Pending straddle: at a set time places a buy stop and a sell stop a set distance from price (news or session open), OCO, optional trailing stop, cancels at expiry."#property strictenum ENUM_FXN_LOTS { FXN_LOTS_FIXED = 0, // Fixed lot FXN_LOTS_RISK = 1 // Risk % of balance };sinput string InpHdrSchedule = "=== Schedule (server time) ==="; // ===== Schedule (server time) =====input int InpPlaceHour = 15; // Hour to place the buy stop and sell stop (0-23, server time)input int InpPlaceMinute = 25; // Minute to place the orders (0-59)input int InpPlaceWindowMin = 3; // Minutes after the set time in which late placement is still allowedinput int InpExpiryMinutes = 60; // Cancel orders that have not filled this many minutes after placementinput int InpMaxTradeMinutes = 0; // Close an open trade after this many minutes (0 = off)sinput string InpHdrOrders = "=== Orders ==="; // ===== Orders =====input int InpDistancePoints = 150; // Distance of each stop order from the current price (points)input int InpStopPoints = 200; // Stop loss distance from the entry price (points)input int InpTargetPoints = 400; // Take profit distance from the entry price (points, 0 = none)sinput string InpHdrTrailingStop = "=== Trailing stop ==="; // ===== Trailing stop =====input bool InpUseTrailing = true; // Trail the stop loss once the trade is in profitinput int InpTrailStartPoints = 150; // Profit in points before trailing startsinput int InpTrailDistancePoints = 100; // Distance of the trailing stop behind price (points)input int InpTrailStepPoints = 20; // Minimum stop improvement per change (points)sinput string InpHdrTradingDays = "=== Trading days ==="; // ===== Trading days =====input bool InpMonday = true; // Trade on Mondayinput bool InpTuesday = true; // Trade on Tuesdayinput bool InpWednesday = true; // Trade on WednesdaySign in to read all the code and download it
It is free. A free account lets you see every line, copy it, download the source and open a copy in your Lab. The compiled file can be downloaded without an account.