Forum

How to release memory after massive CopyRates()?

I've noticed that after copying history with CopyRates MT5 keeps copied array in memory. It's ok for cached access but when I run through lots of symbols my memory ends fast. And memory stays occupied until MT5 exits. Is there any way to forcibly release memory occupied by CopyRates cache

TICK_VALUE for non account currency pair

I need to calculate tick value for currecy pair that does not include account currency, but getting different from defult SymbolInfoDouble(symbol, SYMBOL_TRADE_TICK_VALUE ) result. Can someone please point me on what I'm doing wrong here? void OnStart() { const string symbol = "EURGBP"; //-symbol of

Object access by reference is 3 times faster than acess by ponter, why?

Always thought that: SomeFunc(SomeObject & object ){ //some operations with object..// } // ..and // SomeFunc(SomeObject * object ){ //some operations with object..// } literally means the same for compiler, or at least would be exexuted for the same time. During optimisation of my very big script

#define a line comment symbol (//) - possible?

I was just curious: for debugging purposes I want some of Print() functions to be commented at once. Here's my approach that does not work: #define DEBUG // -debug switcher, comment line for production //debug printer: #ifdef DEBUG #define DB // #else #define DB #endif DB Print ( "some debug

Named Pipes OVERLAPPED structure - possible?

Hi, all. I want my named pipes to be asynchronous. So I need to use _OVERLAPPED structure as a buffer. here is MSDN description of process: https://msdn.microsoft.com/en-us/50f6680f-900e-4411-a849-ec9a911c9e32 My current implementation does not even compile: //-MS Types: #define PVOID int #define

Tester different Bar Open price in different testing modes

Hi all, can anyone explain: why this code returns different Ask and Spread values for the same bar OPEN price from different test modes (tested on Open prices only mode and Every tick based on real ticks ). Is there an error in my code or they shouldn't match at all? Regarding to this