last works applied on XEU5 and pack it ...

also add compile and pack npm script  for XEU5 ...
This commit is contained in:
2024-01-31 17:31:44 -08:00
parent a098550391
commit f973488cdd
8 changed files with 760 additions and 62 deletions
@@ -24,8 +24,15 @@
// START Inputs ...
//
//
input group "Commons";
//
// XCTIMER inputs ...
input bool xEU5ShowCandleTimer = true; // Show Condle Remaining Time
input color xEU5CandleTimerColot = clrYellow; // Candle Timer Color
input ENUM_BASE_CORNER xEU5CandleTimerCorner = CORNER_RIGHT_LOWER; // Where to Show Candle Timer
//
// END Inputs ...
//
@@ -65,6 +72,9 @@ bool isXEU5NewHour;
bool isXEU5NewDay;
bool isXEU5NewWeek;
bool isXEU5NewMonth;
//
int xEU5CTimerHandler = INVALID_HANDLE;
//
// END Global Definitions: Variables, Properties and etc ...
//
@@ -104,6 +114,16 @@ int OnInit()
return INIT_PARAMETERS_INCORRECT;
}
//
// Init XCTimer ...
if (xEU5ShowCandleTimer)
{
if (!XCTimerInit())
{
return INIT_FAILED;
}
}
//
// Init Succeed ...
return INIT_SUCCEEDED;
@@ -135,6 +155,9 @@ void OnDeinit(const int reason)
//
// De Init XDraw Library ...
// OnDeinitDrawLibrary();
//
IndicatorRelease(xEU5CTimerHandler);
}
//
@@ -344,6 +367,30 @@ bool ValidateInputs()
return result;
}
bool XCTimerInit()
{
//
bool result = true;
//
xEU5CTimerHandler = iCustom(
_Symbol,
_Period,
"x-saherelm.xctimer.indicator",
//
// Inputs ...
xEU5CandleTimerColot,
xEU5CandleTimerCorner
);
//
if (xEU5CTimerHandler == INVALID_HANDLE) {
result = false;
}
//
return result;
}
//
// END Functions ...
//