last works on XInd and XMid ...

This commit is contained in:
2024-06-01 16:22:45 +03:30
parent 2109cc1549
commit 103c4b7847
4 changed files with 362 additions and 148 deletions
+13 -27
View File
@@ -122,17 +122,17 @@ int OnCalculate(
//
limit = (prev_calculated > rates_total || prev_calculated <= 0) ? rates_total : (rates_total - prev_calculated) + 1;
// //
// int midMainCopiedItems = mMid.CopyBufferValueByLine(
// XSCMID_MAIN_LINE,
// mainBuffer,
// 0,
// limit //
// );
// if (midMainCopiedItems <= 0)
// {
// return prev_calculated;
// }
//
int midMainCopiedItems = mMid.CopyBufferValue(
GetTitle(XSCMID_MAIN_LINE),
mainBuffer,
0,
limit //
);
if (midMainCopiedItems <= 0)
{
return prev_calculated;
}
//
// Main Loop ...
@@ -211,6 +211,7 @@ void DefineBuffers()
XBufferPlotStyle mainBufferStyle;
mainBufferStyle.clr = clrAqua;
mainBufferStyle.type = DRAW_LINE;
mainBufferStyle.width = 3;
//
SetIndexBuffer(
@@ -220,8 +221,7 @@ void DefineBuffers()
mainColorBuffer,
bufferLabel,
true,
0,
max //
EMPTY_VALUE //
);
}
@@ -235,18 +235,4 @@ void SetIndicatorName()
//
void CalculateBuffers(int barIndex)
{
//
double iValue = mMid.GetBufferValueByLine(
XSCMID_MAIN_LINE,
barIndex //
);
//
// double iValue = iClose(
// _Symbol,
// _Period,
// barIndex //
// );
mainBuffer[barIndex] = iValue;
}