Forum

[extended ASCII] StringGetChar and CharToStr are not identical

Hello, I am working on some functions such as base64_encode and base64_decode. https://www.mql5.com/en/code/8098 But I realize that StringGetChar and CharToStr do not give the same result with extended ASCII (ASCII code > 127 and code < 256) Is this a bug? void testStringChar( ushort chr) { string

Spread Array vs MarketInfo(Symbol(), MODE_SPREAD)

Hello, I saw that the below code prints 2 different values. Question is why? Is it correct that Spread[] contains spread values at open time? and MarketInfo contains current spread value? int OnCalculate ( const int rates_total, const int prev_calculated, const

ChartReDraw() increase memory usage 5.5MB?

When I call ChartReDraw() on a chart, it increase my memory usage 5.5MB. If I have 10 charts, then it is 55MB. ChartReDraw() is also called by CCanvas::Update(). So if you have a CCanvas Object, then you just waste 5.5MB on nothing. WindowReDraw() does not increase memory usage. Is it memory leak

ArrayCopySeries and ArrayCopyRates on MQL5?

Hello all, I fount out that ArrayCopySeries and ArrayCopyRates are 2 useful functions in MQL4. It does not really copy anything except when you call it first time. That saves some manual labour when I work in multiple timeframes. And since it does not actually copy the whole array every time I