last works on x121 indicator and it's Helper ...

This commit is contained in:
2024-12-08 09:38:16 +03:30
parent 22c8c166de
commit 95c7804be5
6 changed files with 9465 additions and 256 deletions
+36 -36
View File
@@ -13058,13 +13058,13 @@ bool IsSpecifiedBearish(ENUM_X_DIRECTION value)
* @return ( int )
*/
int iMAOnBuffer(
const int rates_total,
const int prev_calculated,
const int begin,
const int period,
const double &price[],
double &buffer[],
ENUM_MA_METHOD method = MODE_SMA //
const int _rates_total,
const int _prev_calculated,
const int _begin,
const int _period,
const double &_price[],
double &_buffer[],
ENUM_MA_METHOD _method = MODE_SMA //
)
{
//
@@ -13072,62 +13072,62 @@ int iMAOnBuffer(
//
if (
period < 0 ||
rates_total <= 0 ||
prev_calculated < 0 ||
prev_calculated > rates_total)
_period < 0 ||
_rates_total <= 0 ||
_prev_calculated < 0 ||
_prev_calculated > _rates_total)
{
return result;
}
//
switch (method)
switch (_method)
{
//
case MODE_SMA:
result = SimpleMAOnBuffer(
rates_total,
prev_calculated,
begin,
period,
price,
buffer //
_rates_total,
_prev_calculated,
_begin,
_period,
_price,
_buffer //
);
break;
//
case MODE_EMA:
result = ExponentialMAOnBuffer(
rates_total,
prev_calculated,
begin,
period,
price,
buffer //
_rates_total,
_prev_calculated,
_begin,
_period,
_price,
_buffer //
);
break;
//
case MODE_LWMA:
result = LinearWeightedMAOnBuffer(
rates_total,
prev_calculated,
begin,
period,
price,
buffer //
_rates_total,
_prev_calculated,
_begin,
_period,
_price,
_buffer //
);
break;
//
case MODE_SMMA:
result = SmoothedMAOnBuffer(
rates_total,
prev_calculated,
begin,
period,
price,
buffer //
_rates_total,
_prev_calculated,
_begin,
_period,
_price,
_buffer //
);
break;
}