Prepare XFIMA BackTester for Test ...
This commit is contained in:
@@ -106,6 +106,9 @@ input int zigzagDeviation = 5; // ZigZag Devia
|
||||
input int zigzagBackStep = 3; // ZigZag Back Step
|
||||
input ENUM_X_PRICE zigzagUppersMode = X_PRICE_HIGH; // ZigZag High Detect Mode
|
||||
input ENUM_X_PRICE zigzagLowersMode = X_PRICE_LOW; // ZigZag Low Detect Mode
|
||||
input bool hkIgnoreShadows = true; // HK Remove noises
|
||||
input int hkSmoothingLength = 21; // HK Smoothing Length
|
||||
input ENUM_X_MA_METHOD hkSmoothingMode = X_MA_MODE_EMA; // HK Smoothing Method
|
||||
|
||||
//
|
||||
input group "Bar Timer";
|
||||
@@ -120,6 +123,7 @@ input group "Presentation";
|
||||
input bool showPV = true; // Show PV
|
||||
input bool showHK = true; // Show HK
|
||||
input bool showSAR = true; // Show Sar
|
||||
input bool showBars = true; // Show Bars
|
||||
input bool showMAFast = true; // Show MA Fast
|
||||
input bool showMASlow = true; // Show MA Slow
|
||||
input bool showMABand = true; // Show MA Band
|
||||
@@ -163,10 +167,22 @@ XBarTracker eaBarTracker; // EA Bar Traker ...
|
||||
//
|
||||
// Registered Handlers ...
|
||||
int eaCTHandler = INVALID_HANDLE; // Candle Timer Handler ...
|
||||
int eaCCHandler = INVALID_HANDLE; // Candle Cleaner Handler ...
|
||||
|
||||
//
|
||||
bool eaIsNewBar; // Check New Bar ...
|
||||
|
||||
//
|
||||
ENUM_CHART_MODE eaBarMode = CHART_CANDLES;
|
||||
|
||||
//
|
||||
color eaBarUpColor = clrLime;
|
||||
color eaBarDownColor = clrRed;
|
||||
color eaBarLineColor = clrLime;
|
||||
color eaBarBearishColor = clrRed;
|
||||
color eaBarBullishColor = clrLime;
|
||||
color eaBarVolumesColor = clrGreen;
|
||||
|
||||
//
|
||||
// Define Indicators Here ...
|
||||
|
||||
@@ -293,6 +309,9 @@ int OnInit()
|
||||
fimaInputs.zigzagBackStep = zigzagBackStep;
|
||||
fimaInputs.zigzagUppersMode = zigzagUppersMode;
|
||||
fimaInputs.zigzagLowersMode = zigzagLowersMode;
|
||||
fimaInputs.hkIgnoreShadows = hkIgnoreShadows;
|
||||
fimaInputs.hkSmoothingLength = hkSmoothingLength;
|
||||
fimaInputs.hkSmoothingMode = hkSmoothingMode;
|
||||
fimaInputs.showPV = showPV;
|
||||
fimaInputs.showHK = showHK;
|
||||
fimaInputs.showSAR = showSAR;
|
||||
@@ -358,6 +377,38 @@ int OnInit()
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize Candle Cleaner Handler ...
|
||||
eaCCHandler = iCustom(
|
||||
_Symbol,
|
||||
_Period,
|
||||
"x-saherelm.x121.xcc",
|
||||
//
|
||||
// Inputs ...
|
||||
//
|
||||
// Chart Style ...
|
||||
"",
|
||||
eaBarMode, // Mode
|
||||
eaBarUpColor, // Up Color
|
||||
eaBarDownColor, // Down Color
|
||||
eaBarLineColor, // Line mode and Doji candlestick Color
|
||||
eaBarBullishColor, // Bearish Color
|
||||
eaBarBearishColor, // Bullish Color
|
||||
eaBarVolumesColor, // Volumes Color
|
||||
//
|
||||
// Presentation ...
|
||||
"",
|
||||
showBars // Show Candles
|
||||
//
|
||||
);
|
||||
isInited = eaCCHandler != INVALID_HANDLE;
|
||||
if (!isInited)
|
||||
{
|
||||
//
|
||||
Print(ShortName, ": Initialization Failed ...");
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
// Initialize Bar Tracker ...
|
||||
isInited = eaBarTracker.Init(
|
||||
@@ -614,11 +665,11 @@ void OnSignalExecuted(XSignal &signal)
|
||||
|
||||
/**
|
||||
* Check For Guard ...
|
||||
*
|
||||
*
|
||||
* @param guards: XGuard, reference Collection to holds result ...
|
||||
* @param positions: XPosition, refrence collection to Provides Positions ...
|
||||
* @param barIndex: int, Specified Bar index ...
|
||||
*
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int CheckForGuard(
|
||||
|
||||
Reference in New Issue
Block a user