Compile logCompiled
MetaEditor build 6333 · MT5 · 1 Dec 2026, 10:21 UTCcompiling FXN_PendingStraddle.mq5✓ Result: 0 errors, 0 warnings, 4.6 soutput FXN_PendingStraddle.ex5 · 52 KBsha256 3946472f1391afcd…6f6c57e3
Files version 1.0
| File | Lines | Size |
|---|---|---|
| FXN_PendingStraddle.mq5 | 665 | 23 KB |
| FXN_PendingStraddle.ex5 compiled by the Lab | – | 52 KB |
FXN_PendingStraddle.mq5665 lines
//+------------------------------------------------------------------+//| FXN_PendingStraddle.mq5 |//| 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."#include <Trade\Trade.mqh>enum ENUM_FXN_LOTS { FXN_LOTS_FIXED = 0, // Fixed lot FXN_LOTS_RISK = 1 // Risk % of balance };input group "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)input group "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)input group "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)input group "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.