refactor some typos on helper classes and implement base classes for providers and start x5 provider ...

This commit is contained in:
2024-05-19 01:55:13 +03:30
parent 2777f56d78
commit 9c6cd61f2b
29 changed files with 5672 additions and 235 deletions
+29 -35
View File
@@ -114,9 +114,16 @@ void OnDeinit(const int reason)
// REASON_INITFAILED 8 The OnInit() handler returned a non-zero value
// REASON_CLOSE 9 Terminal closed
//
ulong chID = FindChartID(
_Symbol,
_Period
//
);
//
// Delete Object ...
ObjectDelete(0, ShortName);
ObjectDelete(chID, ShortName);
//
Comment("");
@@ -125,36 +132,16 @@ void OnDeinit(const int reason)
//
// Calculating what we want ...
int OnCalculate(
//
// total Candles on chart ...
const int rates_total,
//
// total calculated Candles on charts ...
const int prev_calculated,
//
// history of Candles Open Time ...
const datetime &time[],
//
// history of Candles Open Price ...
const double &open[],
//
// history of Candles High Price ...
const double &high[],
//
// history of Candles Low Price ...
const double &low[],
//
// history of Candles Close Price ...
const double &close[],
//
// history of Tick Volumes on Candle ...
const long &tick_volume[],
//
// history of Trade Volumes ...
const long &volume[],
//
// history of Candles Spread Price ...
const int &spread[] //
const int rates_total, // Total Bars on Chart ...
const int prev_calculated, // Total Calculated Bars on Charts ...
const datetime &time[], // History of Open Time ...
const double &open[], // History of Open Price ...
const double &high[], // History of High Price ...
const double &low[], // History of Low Price ...
const double &close[], // History of Close Price ...
const long &tick_volume[], // History of Tick Volumes on Bar ...
const long &volume[], // History of Trade Volumes ...
const int &spread[] // History of Spread Price ...
)
{
//
@@ -166,6 +153,13 @@ int OnCalculate(
return rates_total;
}
//
ulong chID = FindChartID(
_Symbol,
_Period
//
);
//
XBarRemainsTime barRemains;
barRemains.Init(
@@ -201,10 +195,10 @@ int OnCalculate(
string objText = "Spread: " + IntegerToString(mSpread) + _sp + " Next Bar in: " + msg;
//
ObjectSetInteger(0, ShortName, OBJPROP_COLOR, clr);
ObjectSetString(0, ShortName, OBJPROP_TEXT, objText);
ObjectSetInteger(0, ShortName, OBJPROP_FONTSIZE, 10);
ObjectSetString(0, ShortName, OBJPROP_FONT, "Courier");
ObjectSetInteger(chID, ShortName, OBJPROP_COLOR, clr);
ObjectSetString(chID, ShortName, OBJPROP_TEXT, objText);
ObjectSetInteger(chID, ShortName, OBJPROP_FONTSIZE, 10);
ObjectSetString(chID, ShortName, OBJPROP_FONT, "Courier");
//
return rates_total;