I have often developed programs that use data that TradeStation may not have in their database, and later wanted to use the signals generated on that data and it apply it to another market. Here is a simple program that uses arrays to specify trade dates and signals. The code to interpret the arrays and then execute the orders follows:
array: DateArray(0),BorSArray(""); vars: iCnt(1); DateArray=1081228; BorSArray="S"; DateArray=1081229; BorSArray="B"; DateArray=1090104; BorSArray="S"; if date >= dateArray then begin if date = dateArray[iCnt] then begin if BorSArray[iCnt] = "B" then buy this bar on close; if BorSArray[iCnt] = "S" then sellShort this bar on close; iCnt = iCnt + 1; end; end;
Notice how arrays are defined and declared. How do you think you would handle a system that goes flat?