resolved onTrade() and onTradeClose to be local to EA instance