From 5dd58eec749b1e284ccd2c28170de45e2f8a344d Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Tue, 16 Sep 2025 01:02:34 +0330 Subject: [PATCH] add support for Bar Timer in FIMA Back Tester EA ... --- Experts/x-saherelm.xfima.backtester.ea.mq5 | 37 +++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/Experts/x-saherelm.xfima.backtester.ea.mq5 b/Experts/x-saherelm.xfima.backtester.ea.mq5 index 8fcc3d6f..b758b426 100644 --- a/Experts/x-saherelm.xfima.backtester.ea.mq5 +++ b/Experts/x-saherelm.xfima.backtester.ea.mq5 @@ -91,6 +91,13 @@ input ENUM_APPLIED_PRICE maAppliedTo = PRICE_CLOSE; // MA Applied To input int maFastLength = 7; // Fast MA Length input int maSlowLength = 20; // Slow MA Length +// +input group "Bar Timer"; +input int barTimeFontSize = 10; // Font Size +input string barTimeFont = "Arial"; // Font +input color barTimeColor = clrYellow; // Text Color +input ENUM_BASE_CORNER barTimeCorner = CORNER_RIGHT_LOWER; // Text Position + // // Presentation ... input group "Presentation"; @@ -98,6 +105,7 @@ input bool showPV = true; // Show PV input bool showSAR = true; // Show Sar input bool showMAFast = true; // Show MA Fast input bool showMASlow = true; // Show MA Slow +input bool showBarTime = true; // Show Bar Time input bool showFiboZone = false; // Show Fibo Zone // @@ -116,7 +124,8 @@ string eaLogTag; // EA Log Prefix ... XCBackTesterEA *eaExpert; // EA Expert ... // -int eaHandler = INVALID_HANDLE; // Indicator Handler ... +int eaHandler = INVALID_HANDLE; // Indicator Handler ... +int eaCTHandler = INVALID_HANDLE; // Candle Timer Handler ... // // Define Indicators Here ... @@ -249,6 +258,32 @@ int OnInit() return INIT_FAILED; } + // + // Initialize Candle Timer Handler ... + eaCTHandler = iCustom( + _Symbol, + _Period, + "x-saherelm.x121.xct", + // + // Inputs ... + barTimeFontSize, // Font Size ... + barTimeFont, // Font ... + barTimeColor, // Text Color ... + barTimeCorner, // Text Position ... + // + // Presentation ... + "", + showBarTime // Show Candle Time + // + ); + isInited = eaCTHandler != INVALID_HANDLE; + if (!isInited) + { + // + Print(ShortName, ": Initialization Failed ..."); + return INIT_FAILED; + } + // Print(ShortName, ": Initialized Successfully ..."); return INIT_SUCCEEDED;