vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
521 stars 281 forks source link

MtApi5: Matlab compatibility - SerializableAttribute #149

Open KptKuck opened 5 years ago

KptKuck commented 5 years ago

Matlab can not save .NET data types. At least not at the moment. The only way is to serialize the data types. Unfortunately, the "SerializableAttribute" is not set for the crucial types.

Would this be possible for all data types that are exported? https://docs.microsoft.com/en-us/dotnet/api/system.serializableattribute?view=netframework-4.7.2 https://de.mathworks.com/matlabcentral/answers/260533-how-can-i-save-net-objects-in-a-mat-file-in-matlab-r2015b

MtApi5.MqlRates MtApi5.MqlBookInfo MtApi5.MqlTick MtApi5.Events MtApi5.MqlTradeCheckResult (less important) MtApi5.MqlTradeRequest (less important) MtApi5.MqlTradeResult (less important)

vdemydiuk commented 5 years ago

Hi. I think it is possible to add serializable attribute for some types of MtApi or make helper for serialization of the object. I will investigate all possible ways to do this task.