I upgraded over the weekend to build 635, from I think it was 455. The function below worked fine in the older build, now I get an error:
"Line type has no properties"
This is pertaining to my variable "line". Can someone tell me what I am doing wrong?
// REMOTE COMMAND VARIABLES (READ ON EACH TICK)
var cmd = new File("stops_tick.txt");
var line=0;
var levels=0;
var version=0;
var version_in=0;
var stop_norm_long_in=0;
var stop_norm_short_in=0;
var tick_live_fl_in=0;
var scalp_fl_in=0;
var line_ctr=0;
// GET REMOTE COMMANDS
cmd.open("rt");
line_ctr=0;
while(!cmd.eof()) {
if (line_ctr==0) {
line = cmd.readln();
levels = line.split(",",8);
version_in=levels[1];
trade_stop_long_in=levels[3];
trade_stop_short_in=levels[5];
tick_live_fl_in=levels[7];
line_ctr=1;
}
if (line_ctr==1) {
line = cmd.readln();
levels = line.split(",",2);
scalp_fl_in=levels[1];
}
}
cmd.close();
if (version_in!=version) {
version=version_in;
trade_stop_long=trade_stop_long_in;
trade_stop_long_intra=trade_stop_long_in;
trade_stop_short=trade_stop_short_in;
trade_stop_short_intra=trade_stop_short_in;
tick_live_fl=tick_live_fl_in;
scalp_fl=scalp_fl_in;
f2.writeln("*** STOP CHANGE FROM INPUT FILE *** HAPPENED AT " + timestamp);
}
Thanks as always . . .
Thomas.
"Line type has no properties"
This is pertaining to my variable "line". Can someone tell me what I am doing wrong?
// REMOTE COMMAND VARIABLES (READ ON EACH TICK)
var cmd = new File("stops_tick.txt");
var line=0;
var levels=0;
var version=0;
var version_in=0;
var stop_norm_long_in=0;
var stop_norm_short_in=0;
var tick_live_fl_in=0;
var scalp_fl_in=0;
var line_ctr=0;
// GET REMOTE COMMANDS
cmd.open("rt");
line_ctr=0;
while(!cmd.eof()) {
if (line_ctr==0) {
line = cmd.readln();
levels = line.split(",",8);
version_in=levels[1];
trade_stop_long_in=levels[3];
trade_stop_short_in=levels[5];
tick_live_fl_in=levels[7];
line_ctr=1;
}
if (line_ctr==1) {
line = cmd.readln();
levels = line.split(",",2);
scalp_fl_in=levels[1];
}
}
cmd.close();
if (version_in!=version) {
version=version_in;
trade_stop_long=trade_stop_long_in;
trade_stop_long_intra=trade_stop_long_in;
trade_stop_short=trade_stop_short_in;
trade_stop_short_intra=trade_stop_short_in;
tick_live_fl=tick_live_fl_in;
scalp_fl=scalp_fl_in;
f2.writeln("*** STOP CHANGE FROM INPUT FILE *** HAPPENED AT " + timestamp);
}
Thanks as always . . .
Thomas.
Comment