vdemydiuk / mtapi

MetaTrader API (terminal bridge)
MIT License
529 stars 283 forks source link

iCustom with parameters #266

Open jfitton74 opened 2 years ago

jfitton74 commented 2 years ago

When using iCustom with parameter array 2147483647 is returned however if I use the method that doesnt take a parameter array I get the correct returned value, it is then using the indicator defaults in the indicator file at this time to simplify testing have been set as 1,3,2.5 ie the same as being passed in through code.

here is the code string sym = "GBPJPY"; const ChartPeriod timeframe = ChartPeriod.PERIOD_D1; string ea = "JFTEST"; double[] param = { 1, 3, 2.5 }; const int mode = 0; const int mode1 = 1; const int shift = 0; var result1 = _apiClient.iCustom(sym, (int)timeframe, ea, param, mode1, shift); var result2 = _apiClient.iCustom(sym, (int)timeframe, ea, mode1, shift);

Am I making a basic mistake or is this a known issue?

I am using v1.43.