Fourteen headers, a header-only MQL5 library: lot size from risk, pips on forex, gold and indices, broker checks, bars and candle patterns, cached ATR, sessions in GMT, account risk, symbol suffixes, a calendar filter. Sends no trade requests. Plus the LotByRisk example script. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
38 lines
2.3 KiB
MQL5
38 lines
2.3 KiB
MQL5
//+------------------------------------------------------------------+
|
|
//| StopFirst.mqh |
|
|
//| Copyright 2026, bandersoft |
|
|
//| https://www.mql5.com/en/users/fats |
|
|
//+------------------------------------------------------------------+
|
|
//| |
|
|
//| Umbrella for the READ-ONLY core. |
|
|
//| |
|
|
//| #include <StopFirst\StopFirst.mqh> |
|
|
//| |
|
|
//| Nothing reachable from here sends a trade request. It reads |
|
|
//| symbol properties, prices, bars, positions and account state, |
|
|
//| and calculates. That is what makes the core safe to attach to a |
|
|
//| live chart, and it is the package published to CodeBase. |
|
|
//| |
|
|
//| For order execution and stop management, include |
|
|
//| StopFirstTrading.mqh instead - it pulls this in and adds them. |
|
|
//| |
|
|
//+------------------------------------------------------------------+
|
|
#ifndef STOPFIRST_MQH
|
|
#define STOPFIRST_MQH
|
|
|
|
#include "Defs.mqh" // constants, sentinels, enums
|
|
#include "Symbol.mqh" // pip size, conversions, broker constraints
|
|
#include "PipTable.mqh" // conventional pips for metals, indices, oil (opt-in)
|
|
#include "Risk.mqh" // position sizing, value at risk
|
|
#include "Bars.mqh" // new-bar detection, extremes, candle patterns
|
|
#include "Atr.mqh" // CAtr and GetATRPips
|
|
#include "Sessions.mqh" // broker GMT offset, FX sessions
|
|
#include "Time.mqh" // timeframe and weekday names, trading hours
|
|
#include "Positions.mqh" // read-only position queries
|
|
#include "Account.mqh" // account metrics, compounding, summary
|
|
#include "AccountRisk.mqh"// total risk across open positions
|
|
#include "Symbols.mqh" // broker symbol-name resolution
|
|
#include "News.mqh" // economic calendar filter
|
|
|
|
#endif // STOPFIRST_MQH
|
|
//+------------------------------------------------------------------+
|