diff --git a/MyLibs/BacktestUtils/CustomMax.mqh b/MyLibs/BacktestUtils/CustomMax.mqh index 3544ae9..8ed1caa 100644 --- a/MyLibs/BacktestUtils/CustomMax.mqh +++ b/MyLibs/BacktestUtils/CustomMax.mqh @@ -1,25 +1,20 @@ +//+------------------------------------------------------------------+ +//| CustomeMax.mqh | +//| Defines custom optimization criteria for backtesting | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include -// --------------------------------------------------------------------- -// ENUM: CUSTOM_MAX_TYPE -// --------------------------------------------------------------------- -// Defines the types of custom performance criteria that can be used -// for calculating max optimization targets. -// -// Values: -// - CM_WIN_LOSS_RATIO : Use win/loss ratio. -// - CM_WIN_PERCENT : Use win percentage. -// --------------------------------------------------------------------- enum CUSTOM_MAX_TYPE { CM_WIN_LOSS_RATIO, CM_WIN_PERCENT }; -// --------------------------------------------------------------------- -// CLASS: CustomMax -// --------------------------------------------------------------------- -// Calculates custom performance criteria for use in optimizations. -// --------------------------------------------------------------------- class CustomMax : public CObject { protected: double custom_criteria; diff --git a/MyLibs/BacktestUtils/TestDataSplit.mqh b/MyLibs/BacktestUtils/TestDataSplit.mqh index 6efa791..98cdbe2 100644 --- a/MyLibs/BacktestUtils/TestDataSplit.mqh +++ b/MyLibs/BacktestUtils/TestDataSplit.mqh @@ -1,33 +1,23 @@ -// --------------------------------------------------------------------- -// ENUM: MODE_SPLIT_DATA -// --------------------------------------------------------------------- -// Defines how to split data during testing based on time attributes. -// -// Values: -// - NO_SPLIT : Do not split, always return true. -// - ODD_YEARS : Include only odd-numbered years. -// - EVEN_YEARS : Include only even-numbered years. -// - ODD_MONTHS : Include only odd-numbered months. -// - EVEN_MONTHS : Include only even-numbered months. -// - ODD_WEEKS : Include only odd-numbered weeks. -// - EVEN_WEEKS : Include only even-numbered weeks. -// --------------------------------------------------------------------- +//+------------------------------------------------------------------+ +//| TestDataSplit.mqh | +//| Splits historical data into training/testing segments | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + enum MODE_SPLIT_DATA { - NO_SPLIT, - ODD_YEARS, - EVEN_YEARS, - ODD_MONTHS, - EVEN_MONTHS, - ODD_WEEKS, - EVEN_WEEKS + NO_SPLIT, // Do not split, always return true. + ODD_YEARS, // Include only odd-numbered years. + EVEN_YEARS, // Include only even-numbered years. + ODD_MONTHS, // Include only odd-numbered months. + EVEN_MONTHS, // Include only even-numbered months. + ODD_WEEKS, // Include only odd-numbered weeks. + EVEN_WEEKS // Include only even-numbered weeks. }; -// --------------------------------------------------------------------- -// CLASS: TestDataSplit -// --------------------------------------------------------------------- -// Provides logic to determine whether the current date falls within -// a selected split group for testing or optimization purposes. -// --------------------------------------------------------------------- class TestDataSplit { public: bool in_test_period(MODE_SPLIT_DATA data_split_method); diff --git a/MyLibs/Orders/AdjustPosition.mqh b/MyLibs/Orders/AdjustPosition.mqh index b2d9520..49375d1 100644 --- a/MyLibs/Orders/AdjustPosition.mqh +++ b/MyLibs/Orders/AdjustPosition.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| AdjustPosition.mqh | +//| Manages stop loss adjustments, trailing stops, and breakevens | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include #include @@ -7,12 +17,6 @@ CTrade trade; AtrHandleManager atr_manager; -// --------------------------------------------------------------------- -// CLASS: AdjustPosition -// --------------------------------------------------------------------- -// Provides methods to manage stop-loss logic for runner trades. -// Includes breakeven, trailing stop (fixed and ATR), and virtual TP SLs. -// --------------------------------------------------------------------- class AdjustPosition { public: void set_breakeven_sl(string symbol, int runner_magic_no, double buffer_points = 5); diff --git a/MyLibs/Orders/CalculatePositionData.mqh b/MyLibs/Orders/CalculatePositionData.mqh index cca904d..ac1b361 100644 --- a/MyLibs/Orders/CalculatePositionData.mqh +++ b/MyLibs/Orders/CalculatePositionData.mqh @@ -1,14 +1,19 @@ +//+------------------------------------------------------------------+ +//| CalculatePositionData.mqh | +//| Provides core logic for computing stop loss, take profit, lot | +//| size, and trading costs based on symbol, price, and risk | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include #include #include #include -// --------------------------------------------------------------------- -// CLASS: CalculatePositionData -// --------------------------------------------------------------------- -// Provides core logic for computing stop loss, take profit, lot size, -// and trading costs based on symbol, price, and risk parameters. -// --------------------------------------------------------------------- class CalculatePositionData : public CObject { protected: CTrade trade; diff --git a/MyLibs/Orders/EntryOrders.mqh b/MyLibs/Orders/EntryOrders.mqh index 742fe49..336b0a2 100644 --- a/MyLibs/Orders/EntryOrders.mqh +++ b/MyLibs/Orders/EntryOrders.mqh @@ -1,13 +1,25 @@ + +//+------------------------------------------------------------------+ +//| EntryOrders.mqh | +//| Handles logic for opening buy/sell orders | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include +#include #include class EntryOrders { protected: CTrade trade; CalculatePositionData calc; + OrderTracker track; public: - int count_open_positions(string symbol, int order_side, long _magic_number); bool open_buy_orders(string symbol, bool condition, ENUM_TIMEFRAMES atr_period, string _sl_mode, double sl_var, string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number); @@ -30,30 +42,6 @@ public: string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number); }; -// --------------------------------------------------------------------- -// Counts open positions by symbol, side, and magic number. -// -// Parameters: -// - symbol : Symbol to check. -// - order_side : 1 = Buy, 2 = Sell, 0 = Any. -// - _magic_number : Magic number to filter. -// -// Returns: -// - Number of matching open positions. -// --------------------------------------------------------------------- -int EntryOrders::count_open_positions(string symbol, int order_side, long _magic_number) { - int count = 0; - for (int i = PositionsTotal() - 1; i >= 0; i--) { - ulong ticket = PositionGetTicket(i); - if (PositionGetString(POSITION_SYMBOL) == symbol && PositionGetInteger(POSITION_MAGIC) == _magic_number) { - int type = (int) PositionGetInteger(POSITION_TYPE); - if (order_side == 0 || (order_side == 1 && type == POSITION_TYPE_BUY) || (order_side == 2 && type == POSITION_TYPE_SELL)) { - count++; - } - } - } - return count; -} // --------------------------------------------------------------------- // Opens a market BUY position. @@ -77,7 +65,7 @@ bool EntryOrders::open_buy_orders(string symbol, bool condition, ENUM_TIMEFRAMES string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number) { if (!condition) return false; double current_price = SymbolInfoDouble(symbol, SYMBOL_ASK); - if (count_open_positions(symbol, 1, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 1, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, current_price, 1, _sl_mode, sl_var, atr_period); double take_profit = calc.calculate_take_profit(symbol, current_price, stop_loss, 1, _tp_mode, tp_var, atr_period); @@ -118,7 +106,7 @@ bool EntryOrders::open_sell_orders(string symbol, bool condition, ENUM_TIMEFRAME string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number) { if (!condition) return false; double current_price = SymbolInfoDouble(symbol, SYMBOL_BID); - if (count_open_positions(symbol, 2, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 2, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, current_price, 2, _sl_mode, sl_var, atr_period); double take_profit = calc.calculate_take_profit(symbol, current_price, stop_loss, 2, _tp_mode, tp_var, atr_period); @@ -161,7 +149,7 @@ bool EntryOrders::open_buy_stop_order(string symbol, bool condition, double entr string _sl_mode, double sl_var, string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number) { if (!condition) return false; - if (count_open_positions(symbol, 1, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 1, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, entry_price, 1, _sl_mode, sl_var, atr_period); double take_profit = calc.calculate_take_profit(symbol, entry_price, stop_loss, 1, _tp_mode, tp_var, atr_period); @@ -204,7 +192,7 @@ bool EntryOrders::open_sell_stop_order(string symbol, bool condition, double ent string _sl_mode, double sl_var, string _tp_mode, double tp_var, string _lot_mode, double lot_var, long _magic_number) { if (!condition) return false; - if (count_open_positions(symbol, 2, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 2, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, entry_price, 2, _sl_mode, sl_var, atr_period); double take_profit = calc.calculate_take_profit(symbol, entry_price, stop_loss, 2, _tp_mode, tp_var, atr_period); @@ -246,7 +234,7 @@ bool EntryOrders::open_runner_buy_order_with_virtual_tp(string symbol, bool cond long _magic_number) { if (!condition) return false; double current_price = SymbolInfoDouble(symbol, SYMBOL_ASK); - if (count_open_positions(symbol, 1, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 1, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, current_price, 1, _sl_mode, sl_var, atr_period); double virtual_tp = calc.calculate_take_profit(symbol, current_price, stop_loss, 1, _tp_mode, tp_var, atr_period); @@ -288,7 +276,7 @@ bool EntryOrders::open_runner_sell_order_with_virtual_tp(string symbol, bool con long _magic_number) { if (!condition) return false; double current_price = SymbolInfoDouble(symbol, SYMBOL_BID); - if (count_open_positions(symbol, 2, _magic_number) > 0) return false; + if (track.count_open_positions(symbol, 2, _magic_number) > 0) return false; double stop_loss = calc.calculate_stoploss(symbol, current_price, 2, _sl_mode, sl_var, atr_period); double virtual_tp = calc.calculate_take_profit(symbol, current_price, stop_loss, 2, _tp_mode, tp_var, atr_period); diff --git a/MyLibs/Orders/ExitOrders.mqh b/MyLibs/Orders/ExitOrders.mqh index e994738..3988b19 100644 --- a/MyLibs/Orders/ExitOrders.mqh +++ b/MyLibs/Orders/ExitOrders.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| ExitOrders.mqh | +//| Handles logic for closing trades under various conditions | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include #include #include diff --git a/MyLibs/Orders/OrderTracker.mqh b/MyLibs/Orders/OrderTracker.mqh index cc75fbd..5ef0d2b 100644 --- a/MyLibs/Orders/OrderTracker.mqh +++ b/MyLibs/Orders/OrderTracker.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| OrderTracker.mqh | +//| Tracks open orders or pending positions | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include #include @@ -8,63 +18,33 @@ class OrderTracker { public: int count_open_positions(string symbol, int order_side, long magic_number); - int count_all_positions(string symbol, long magic_number); int count_pending_orders(string symbol, ENUM_ORDER_TYPE order_type, long magic); }; // --------------------------------------------------------------------- -// Counts the number of open BUY or SELL positions for a given symbol. +// Counts open positions by symbol, side, and magic number. // // Parameters: -// - symbol : Trading symbol (e.g., "EURUSD"). -// - order_side : 1 = BUY, 2 = SELL. -// - magic_number : Magic number identifying strategy group. +// - symbol : Symbol to check. +// - order_side : 1 = Buy, 2 = Sell, 0 = Any. +// - _magic_number : Magic number to filter. // // Returns: // - Number of matching open positions. // --------------------------------------------------------------------- -int OrderTracker::count_open_positions(string symbol, int order_side, long magic_number) { +int OrderTracker::count_open_positions(string symbol, int order_side, long _magic_number) { int count = 0; - for (int i = PositionsTotal() - 1; i >= 0; i--) { ulong ticket = PositionGetTicket(i); - - if (PositionGetString(POSITION_SYMBOL) == symbol && PositionGetInteger(POSITION_MAGIC) == magic_number) { - if (order_side == 1 && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY) { - count++; - } - - if (order_side == 2 && PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_SELL) { + + if (PositionGetString(POSITION_SYMBOL) == symbol && PositionGetInteger(POSITION_MAGIC) == _magic_number) { + int type = (int) PositionGetInteger(POSITION_TYPE); + if (order_side == 0 || (order_side == 1 && type == POSITION_TYPE_BUY) || (order_side == 2 && type == POSITION_TYPE_SELL)) { count++; } } } - - return count; -} - -// --------------------------------------------------------------------- -// Counts all open positions for a symbol regardless of direction. -// -// Parameters: -// - symbol : Trading symbol. -// - magic_number : Magic number identifying strategy group. -// -// Returns: -// - Total number of matching positions. -// --------------------------------------------------------------------- -int OrderTracker::count_all_positions(string symbol, long magic_number) { - int count = 0; - - for (int i = PositionsTotal() - 1; i >= 0; i--) { - ulong ticket = PositionGetTicket(i); - - if (PositionGetString(POSITION_SYMBOL) == symbol && PositionGetInteger(POSITION_MAGIC) == magic_number) { - count++; - } - } - return count; } diff --git a/MyLibs/Orders/StopLogic.mqh b/MyLibs/Orders/StopLogic.mqh index 4225f0b..dbf5ee3 100644 --- a/MyLibs/Orders/StopLogic.mqh +++ b/MyLibs/Orders/StopLogic.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| StopLogic.mqh | +//| stoploss switch for in-code sl calculations | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + class StopLogic { public: double sl_specified_value_switch(string sl_mode, double inp_sl_var, double value); diff --git a/MyLibs/RiskManagement/DrawdownControl.mqh b/MyLibs/RiskManagement/DrawdownControl.mqh index 4152211..e35740f 100644 --- a/MyLibs/RiskManagement/DrawdownControl.mqh +++ b/MyLibs/RiskManagement/DrawdownControl.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| DrawdownControl.mqh | +//| Implements account drawdown-based risk controls (for prop-firms) | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #property library #include #include diff --git a/MyLibs/Strategy/RangeCalculator.mqh b/MyLibs/Strategy/RangeCalculator.mqh index a6d7fe5..b59cdc2 100644 --- a/MyLibs/Strategy/RangeCalculator.mqh +++ b/MyLibs/Strategy/RangeCalculator.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| RangeCalculator.mqh | +//| Determines a high/low price point within a time range | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #property library #include #include diff --git a/MyLibs/Utils/AtrHandleManager.mqh b/MyLibs/Utils/AtrHandleManager.mqh index 96307a7..34f32cf 100644 --- a/MyLibs/Utils/AtrHandleManager.mqh +++ b/MyLibs/Utils/AtrHandleManager.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| AtrHandleManager.mqh | +//| ATR Handle Caching Utility for MQL5 EAs | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include class AtrHandleManager { diff --git a/MyLibs/Utils/ChartUtils.mqh b/MyLibs/Utils/ChartUtils.mqh index aa5783c..d468c42 100644 --- a/MyLibs/Utils/ChartUtils.mqh +++ b/MyLibs/Utils/ChartUtils.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| ChartUtils.mqh | +//| Utilities for drawing and annotating charts | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include class ChartUtils : public CObject { diff --git a/MyLibs/Utils/Enums.mqh b/MyLibs/Utils/Enums.mqh index 71624e3..beb9bde 100644 --- a/MyLibs/Utils/Enums.mqh +++ b/MyLibs/Utils/Enums.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| Enums.mqh | +//| Enum declarations for inputs and logic flow | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + enum LOT_MODE{ LOT_MODE_FIXED, // Fixed Lot Size LOT_MODE_PCT_ACCOUNT, // Percent of Account (fixed) diff --git a/MyLibs/Utils/MarketDataUtils.mqh b/MyLibs/Utils/MarketDataUtils.mqh index 6bbc175..a8bccab 100644 --- a/MyLibs/Utils/MarketDataUtils.mqh +++ b/MyLibs/Utils/MarketDataUtils.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| MarketDataUtils.mqh | +//| Simplifies access to indicator buffers and price info | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + class MarketDataUtils { public: bool is_new_bar(string symbol, ENUM_TIMEFRAMES time_frame, string daily_start_time = "00:10"); diff --git a/MyLibs/Utils/MultiSymbolSignalTracker.mqh b/MyLibs/Utils/MultiSymbolSignalTracker.mqh index 2bce10f..89d77f9 100644 --- a/MyLibs/Utils/MultiSymbolSignalTracker.mqh +++ b/MyLibs/Utils/MultiSymbolSignalTracker.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| MultiSymbolSignalTracker.mqh | +//| Tracks per-symbol signal state in multi-asset EAs | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include // --------------------------------------------------------------------- diff --git a/MyLibs/Utils/ResourceManager.mqh b/MyLibs/Utils/ResourceManager.mqh index 6144fa0..a6256a8 100644 --- a/MyLibs/Utils/ResourceManager.mqh +++ b/MyLibs/Utils/ResourceManager.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| ResourceManager.mqh | +//| Central manager for indicator handle cleanup | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include // --------------------------------------------------------------------- diff --git a/MyLibs/Utils/SignalStateTracker.mqh b/MyLibs/Utils/SignalStateTracker.mqh index 602e5c9..844917a 100644 --- a/MyLibs/Utils/SignalStateTracker.mqh +++ b/MyLibs/Utils/SignalStateTracker.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| SignalStateTracker.mqh | +//| Tracks signal timing (e.g. how many bars ago a trigger occurred) | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + class SignalStateTracker { private: diff --git a/MyLibs/Utils/TimeZones.mqh b/MyLibs/Utils/TimeZones.mqh index 4d1f228..919d1b0 100644 --- a/MyLibs/Utils/TimeZones.mqh +++ b/MyLibs/Utils/TimeZones.mqh @@ -1,3 +1,14 @@ +//+------------------------------------------------------------------+ +//| TimeZones.mqh | +//| Handles timezone conversion and time window logic | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + + #property library #include #include diff --git a/MyLibs/Utils/TradeWindow.mqh b/MyLibs/Utils/TradeWindow.mqh index fa33a84..9563fba 100644 --- a/MyLibs/Utils/TradeWindow.mqh +++ b/MyLibs/Utils/TradeWindow.mqh @@ -1,10 +1,21 @@ +//+------------------------------------------------------------------+ +//| TradeWindow.mqh | +//| Defines and manages tradable time sessions | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + + #include class TradeSessionUtils { protected: - TimeZones tz; // For handling timezone conversion - bool in_window; // Whether the current time is in the allowed window + TimeZones tz; // For handling timezone conversion + bool in_window; // Whether the current time is in the allowed window datetime start_time; // Session start time (converted to Broker time) datetime end_time; // Session end time (converted to Broker time) diff --git a/MyLibs/indicators/AtrBands.mqh b/MyLibs/indicators/AtrBands.mqh index 8234cba..8363e9a 100644 --- a/MyLibs/indicators/AtrBands.mqh +++ b/MyLibs/indicators/AtrBands.mqh @@ -1,3 +1,13 @@ +//+------------------------------------------------------------------+ +//| AtrBands.mqh | +//| Calculates and visualizes ATR-based dynamic bands | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include #include diff --git a/MyLibs/indicators/TrendlineAnalyser.mqh b/MyLibs/indicators/TrendlineAnalyser.mqh index cde0d06..a939df1 100644 --- a/MyLibs/indicators/TrendlineAnalyser.mqh +++ b/MyLibs/indicators/TrendlineAnalyser.mqh @@ -1,11 +1,15 @@ +//+------------------------------------------------------------------+ +//| TrendlineAnalyser.mqh | +//| Detects price crossovers and trend direction for a ma buffer | +//| | +//| 2025 xMattC (github.com/xMattC) | +//+------------------------------------------------------------------+ +#property copyright "2025 xMattC (github.com/xMattC)" +#property link "https://github.com/xMattC" +#property version "1.00" + #include -// --------------------------------------------------------------------- -// CLASS: TrendlineAnalyser -// --------------------------------------------------------------------- -// A utility class to detect price crossovers with a trendline buffer. -// Supports both crossover detection and trend direction checks. -// --------------------------------------------------------------------- class TrendlineAnalyser { private: MarketDataUtils market_data_utils;