add support for Bar Timer in FIMA Back Tester EA ...
This commit is contained in:
@@ -91,6 +91,13 @@ input ENUM_APPLIED_PRICE maAppliedTo = PRICE_CLOSE; // MA Applied To
|
|||||||
input int maFastLength = 7; // Fast MA Length
|
input int maFastLength = 7; // Fast MA Length
|
||||||
input int maSlowLength = 20; // Slow 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 ...
|
// Presentation ...
|
||||||
input group "Presentation";
|
input group "Presentation";
|
||||||
@@ -98,6 +105,7 @@ input bool showPV = true; // Show PV
|
|||||||
input bool showSAR = true; // Show Sar
|
input bool showSAR = true; // Show Sar
|
||||||
input bool showMAFast = true; // Show MA Fast
|
input bool showMAFast = true; // Show MA Fast
|
||||||
input bool showMASlow = true; // Show MA Slow
|
input bool showMASlow = true; // Show MA Slow
|
||||||
|
input bool showBarTime = true; // Show Bar Time
|
||||||
input bool showFiboZone = false; // Show Fibo Zone
|
input bool showFiboZone = false; // Show Fibo Zone
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -117,6 +125,7 @@ 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 ...
|
// Define Indicators Here ...
|
||||||
@@ -249,6 +258,32 @@ int OnInit()
|
|||||||
return INIT_FAILED;
|
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 ...");
|
Print(ShortName, ": Initialized Successfully ...");
|
||||||
return INIT_SUCCEEDED;
|
return INIT_SUCCEEDED;
|
||||||
|
|||||||
Reference in New Issue
Block a user