Code: Select all
var: intrabarpersist BarNo(0), LogText("");
If LastBarOnChart then
begin
Buy next bar 1 contracts at market;
If BarNo<>BarNumber then
begin
LogText = "Entryprice : "+NumToStr(i_AvgEntryPrice, 2)+" ("+NumToStr(i_CurrentContracts, 0)+" contracten)";
print((File("C:\logfile.txt"), LogText);
BarNo = BarNumber;
end;
end;