Hi everyone
Just wanted to share an experience about broker-specific asset symbols while setting up a simulated broker account.
My broker (Think Forex) uses a suffix for its currency instruments based on the type of account you have with them. For my account, the suffix 'pro' is added. So the EUR/USD instrument becomes EURUSDpro.
In order to use the correct price history, I altered Zorro's EA to capture the correct asset names as suggested in the manual:
string assetFix(string Asset)
{
if(Asset == "AUD/USD") return("AUDUSDpro");
if(Asset == "EUR/USD") return("EURUSDpro");
etc
Unlike the currencies, the broker's indices match the indices used in the strategy. However, when I try to trade the strategy, Zorro doesn't seem to recognise the indices. I added the indices to the list of assets in the EA's code, even though they matched:
if(Asset == "NAS100") return("NAS100");
if(Asset == "SPX500") return("SPX500");
...and then the strategy worked fine.
Anyone else find something similar? Am I missing something here?
Either way, this might be a workaround if anyone else finds a similar problem.