{5} If DateToJulian(Date) >= FirstExpDate Then Begin
If DateToJulian(Date) - DateToJulian(Date[1]) > 1 Then Begin;
For Missing = (DateToJulian(Date[1]) + 1) To (DateToJulian(Date) - 1)
Begin
FillDate = JulianToDate(Missing);
If DayOfWeek(FillDate) > 0 and
DayOfWeek(FillDate) < 6 Then Begin
ExcelMonth = Month(FillDate);
ExcelDay = DayOfMonth(FillDate);
ExcelYear = Year(FillDate);
If ExcelYear >= 100 Then
ExcelYear = 2000 + (ExcelYear - 100);
ExcelDate = NumToStr(ExcelMonth, 0) + "/" +
NumToStr(ExcelDay, 0) + "/" + NumToStr(ExcelYear, 0);
TradeString = ExcelDate + "," + NumToStr(SteppinIn[1], 4) +
"," +
NumToStr(RiskValue[1], 4) + "," + NumToStr(PosProfit[1],
4) + "," +
"0" + NewLine;
If TradeString <> OldString Then
FileAppend(FileName, TradeString);
OldString = TradeString;
End;
End;
End;
{6} ClosedProfit = 0;
If MarketPosition = 0 Then Begin
SteppinIn = 0;
RiskValue = 0;
PosProfit = 0;
End;
If MarketPosition <> 0 Then Begin
SteppinIn = EntryPrice;
RiskValue = RiskValue[1];
If MarketPosition = 1 Then
PosProfit = Close - EntryPrice;
If MarketPosition = -1 Then
340 PART 4 Money Management