For the following code when IB throws error its not being caught in the try catch block, instead it just halts the script execution and throws error on the console, what am I doing wrong?
try{
orderid= Trade.buyLimit({"limit":cpr,"symbol":sSymBol,"qty" :un,"account":"XXXXX402","route":"SMART"});
}catch(e){
debugPrintln(" ERRROR :"+ e.message);
}
try{
orderid= Trade.buyLimit({"limit":cpr,"symbol":sSymBol,"qty" :un,"account":"XXXXX402","route":"SMART"});
}catch(e){
debugPrintln(" ERRROR :"+ e.message);
}
Comment