vdemydiuk / mtapi

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

Access External Variables from within C# #128

Open donjuandx opened 6 years ago

donjuandx commented 6 years ago

Would it be possible to add additional extern variables in the MetaEditor and access them from within C#? I found a GetGlobalVariable function but that does not return the value from extern variables as this function would exist outside of the actual available MT4 functions.

Does something like this exist already or can we maybe assist you in implementing such a function?

image

image

donjuandx commented 5 years ago

We have done the interface enhancements for the above but we are struggling to access external variables (in MQL language) using the name of the external variable....

We basically need to be able to get the current extern variable value using the name of the variable....

eg: GetExternalVarValueDbl( string variablename ) { return MT4ClientExternalVariableByName( variablename ); }....we are not sure what method's exist in MQL4 to be able to accesss extern variable's by value, did some research but have not found any suitable method / function to be able to do this...

@vdemydiuk do you know of any methods / functions to be able to to this? As soon as we get this right the integration will work for back testing optimization through MT4 backtesting as well....and we are happy to share / contribute the code back @vdemydiuk to enhance the MT4Api solution...