Hi all,
in the past, I have done automatic trading with custom Expert Advisors in MetaTrader 4, but now have switched to Trading Station. Currently, I am trying to rewrite my EAs in lua / IndiCore SDK. Thereby, I have run into problems:
When backtesting my strategy, nothing happens; the strategy tries to open trades, but this obviously fails every time. To debug, I have set a breakpoint in the first code line in AsyncOperationFinished(). The debugger hits that breakpoint as expected, but the success parameter is false, meaning that the trade could not be opened, and the msg parameter is "Specified account is not found".
When hitting the breakpoint, there is only one row in the Accounts table. I have ckecked that row's AccountID field against against Valuemap.AccountID of the Valuemap which is used for opening the trades; they are the same (in my case, they are both TESTACCT).
Could anybody please explain what is happening here?
Thank you very much,
Peter