add support for Bar Timer in FIMA Back Tester EA ...

This commit is contained in:
2025-09-16 01:02:34 +03:30
parent 011a82bf1e
commit 5dd58eec74
+36 -1
View File
@@ -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;