You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a IndexOutofRangeException 'Index was outside the bounds of the array.' When backtesting GBP_JPY.
I don't think this error is necessarily specific to JPY pairs. The error happens within the EMA.cs object when getting the number of decimalPlaces in the close price we split at the "." and the exception gets thrown when there are all zeros to the right of the decimal. This is because when converting the string 161.000 to a decimal the decimal becomes 161 without a dot.
I fixed this by declaring the number of decimal places immediately after obtaining the candles in the ProcessBackTest method. This is done before the candle strings are converted to decimals and entered into the datatable.
At the moment whenever I choose a JPY pair for back testing I'm getting an error.
The text was updated successfully, but these errors were encountered: