Статья о традиционных и не совсем традиционных алгоритмах усреднения, упакованных в максимально простые и достаточно однотипные классы. Они задумывались для универсального использования в практических разработках индикаторов. Надеюсь, что предложенные классы в определенных ситуациях могут оказаться достаточно актуальной альтернативой громоздким, в некотором смысле, вызовам пользовательских и технических индикаторов.
The way is to screw with the array structure. I.e. slip a timeseries pointer instead of an array pointer, along with adequate parameters, so the structure thinks it's ok.
aha, got it!
and then pull a structure instead of an array reference across functions...
the structure is sort of detached from the array, but you can still get data from
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
TheXpert:
I need a normal array without copying
The way is to screw with the array structure. I.e. slip a timeseries pointer instead of an array pointer, along with adequate parameters, so the structure thinks it's ok.
aha, got it!
and then pull a structure instead of an array reference across functions...
the structure is sort of detached from the array, but you can still get data from
ArrayStore::double x[];now all that's left is to take off :)
Can you get a perspective? Theoretically, the same thing can be done to anything, including objects.
I wouldn't advise you to get a perspective. :))
I sat with your problem for a while, and something cleared up.
first two bytes are array type (int).
second two bytes - unclear.
the third two - number of bytes in the data element (int)
// int x[][15]; // == 0x5200 0100 0400 // здесь в каментах - первые три пары байт структуры
// uint x[][15]; // == 0x5300 0100 0400
// short x[][15]; // == 0x5000 0100 0200
// ushort x[][15]; // == 0x4F00 0100 0200
// char x[][15]; // == 0x4D00 0100 0100
// uchar x[][15]; // == 0x4E00 0100 0100
// long x[][15]; // == 0x5500 0100 0800
// ulong x[][15]; // == 0x5600 0100 0800
// double x[][15]; // == 0x5800 0100 0800
// datetime x[][15];// == 0x5400 0100 0800
Then there's four [ulong][ulong][ulong][ulong][ulong] in a row.
then the size of the reserved buffer.
and then a buffer pointer (haven't checked yet).
the rest is unclear, maybe a reserve but not for sure
Yeah. But that's if you exclude memcpy
before that, it's worth checking if internal array copying is faster than memcpy at all
I sat with your problem for a while, something cleared up.
Yeah. But that's if you exclude memcpy
before that, it's worth checking if internal array copying is faster than memcpy at all
MetaDriver:
further confusion, possibly a reserve, but not a certainty