i have attached esignal paper trade to one of my formulas so that it will automatically paper trade the formula in real time, and that is working fine.
i am now trying to put a switch into the formula so i can turn the paper trade on & off,
these are my workings for the switch
var vBrokerType=0; //0=none, 1= esignal paper trade
if(vBrokerType==1){
var PTtrade = new PaperTradeBroker;
}
if (vBrokerType==0){
var PTtrade = null;
}
the efs runs with the switch off until it trys to execute a trade then i get a syntax error , "PTtrade has no properties" what do i need to do to make it work,
thanks
i am now trying to put a switch into the formula so i can turn the paper trade on & off,
these are my workings for the switch
var vBrokerType=0; //0=none, 1= esignal paper trade
if(vBrokerType==1){
var PTtrade = new PaperTradeBroker;
}
if (vBrokerType==0){
var PTtrade = null;
}
the efs runs with the switch off until it trys to execute a trade then i get a syntax error , "PTtrade has no properties" what do i need to do to make it work,
thanks
Comment