I have just moved a Forex strategy into a staging (demo) account with FXCM. The first attempted trade threw two simultaneous errors.
1:
'BBTF_STF_ID_TF_BBPctB/a9cc8b1fa6da489abaf0afd298bb0f8e' submitted an order that generated the following error 'UnableToSubmitOrder'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
2:
Staging1, Order Quantity must be a multiple of 1000 affected Order: Buy 2 Stop @ 102.18
Naturally, my method to determine lot size is different in a staging or live environment than it is during backtesting, since the live environment can look up an account value.
Troubleshooting the second problem, it looks like the GetAccountValue(AccountItem.CashValue); method is returning zero, when it should be returning 50,000. Why would this happen?
Secondly, this code "Instrument.MasterInstrument.PointValue" is returning 1,000. This is incorrect - a point in the USD/JPY currency pair should be either $1 or $0.1 depending on whether the automatic lot size returned from FXCM is 10,000 or 1,000. What is happening here?
Thank you.
Comment