Libraries: TradeTransactions - page 9

I’m not sure whether this is a mistake on my part or whether it’s due to a new compiler directive, but I’m getting the following errors when compiling the library.

I did download the individual files from the RU section.
cannot convert parameter 'uint[]' to 'ONTRADETRANSACTION&[]' ResourceData.mqh 23 21 
   int RESOURCEDATA<ONTRADETRANSACTION>::Get(ONTRADETRANSACTION&[]) const ResourceData.mqh 26 7 
call resolves to 'int RESOURCEDATA<ONTRADETRANSACTION>::Get(ONTRADETRANSACTION&[]) const' instead of 'int RESOURCE::Get(uint&[]) const' due to new rules of method hiding ResourceData.mqh 23 17 
   see declaration of function 'RESOURCEDATA<ONTRADETRANSACTION>::Get' ResourceData.mqh 26 7 
   see declaration of function 'RESOURCE::Get' Resource.mqh 20 7 
cannot convert parameter 'uint[]' to 'ONTRADETRANSACTION&[]' ResourceData.mqh 42 18 
   int RESOURCEDATA<ONTRADETRANSACTION>::Get(ONTRADETRANSACTION&[]) const ResourceData.mqh 26 7 
call resolves to 'int RESOURCEDATA<ONTRADETRANSACTION>::Get(ONTRADETRANSACTION&[]) const' instead of 'int RESOURCE::Get(uint&[]) const' due to new rules of method hiding ResourceData.mqh 42 14 
   see declaration of function 'RESOURCEDATA<ONTRADETRANSACTION>::Get' ResourceData.mqh 26 7 
   see declaration of function 'RESOURCE::Get' Resource.mqh 20 7 
wrong parameters count, 1 passed, but 3 requires TradeTransactions.mqh 72 34 
   ulong TRADETRANSACTIONS::Get(MqlTradeTransaction&,MqlTradeRequest&,MqlTradeResult&) TradeTransactions.mqh 48 9 
call resolves to 'ulong TRADETRANSACTIONS::Get(MqlTradeTransaction&,MqlTradeRequest&,MqlTradeResult&)' instead of 'int RESOURCEDATA<ONTRADETRANSACTION>::Get(ONTRADETRANSACTION&[]) const' due to new rules of hiding method TradeTransactions.mqh 72 34 
   see declaration of function 'TRADETRANSACTIONS::Get' TradeTransactions.mqh 48 9 
   see declaration of function 'RESOURCEDATA<ONTRADETRANSACTION>::Get' ResourceData.mqh 26 7 


In any case, to resolve the compiler issues, change the following:


In ResourceData.mqh:

Replace:

return  ( this  . Get(Data) * sizeof  ( uint  ) / sizeof  (T)); 

with:

return  (RESOURCE::Get(Data) * sizeof  ( uint  ) / sizeof  (T)); 

and replace:

if  ( this  .Get(Data) && (Pos < ( uint  ) this  .Get(Array))) 

with:

if  (RESOURCE::Get(Data) && (Pos < ( uint  ) this  .Get(Array))) 


In TradeTransaction.mqh:

replace:

const  uint  NewTotal = this  .Get(OnTradeTrans); 

with:

c onst  uint  NewTotal = RESOURCEDATA<ONTRADETRANSACTION>::Get(OnTradeTrans); 
Enrique Dangeroux #:

I did download the individual files from the RU section.

The page states that the code was updated on 21 September 2026, but I didn’t do that.

Apparently, MQ did this automatically across the entire codebase. They changed the encoding: UTF-8 → UTF-8 BOM.


The library hasn’t been updated for a long time. The compiler rules have indeed changed.