Wealth-Lab 2.1 example

var file : integer;
var order, mvarOrderId, mvarAccount : string;
var mvarStopPrice1, mvarLimitPrice : float;
var mvarQuantity : integer;

file := FileOpen('C:\TradeBullet\order1.tb');

{make sure you start with a new file}
FileClear(file); mvarAccount : = 'U123456';

if condition1 then
begin
  mvarQuantity := 1;
  mvarStopPrice1 := 100.25;
  mvarLimitPrice1 := mvarStopPrice1  + 1.5;
  order := 'Place,' + 
    mvarAccount +
    ' , ES 03-05, Globex, BUY,' + 
    IntToStr (mvarQuantity) + 
    ',STOPLIMIT,' +
    FloatToStr (mvarStopPrice1) + ',' + 
    FloatToStr (mvarLimitPrice) + 
    'Day,,,System1';
  FileWrite (file, order);
end;
else if condition2 then
begin
  mvarOrderId := 'TB12345'
  order := ' cancel,' + 
    mvarAccount + 
    ',,,,,,,,, ' + 
    mvarOrderId ;
  FileWrite (file, order);
end;