- ago
This Building Block Strategy

Should open a new position on my birthday.

It does not....

... because it produces this C# Code

CODE:
               dt = bars.DateTimes[index];                dtStart = new DateTime(1900,2,4);                dtEnd = new DateTime(2026,11,13);                coStart = CompareOperand.NotEqualTo; // WRONG!!                coEnd = CompareOperand.LessThanEqualTo;                if (coStart.CompareDates(dt, dtStart, true))                {                   condition0 = true;                }


I think instead of
CODE:
coStart = CompareOperand.NotEqualTo;
it should read
CODE:
coStart = CompareOperand.EqualTo;


... but even if I change the C# code as depicted above it does not work as intended...

This code does the job.

CODE:
               if (dt.Day == dtStart.Day && dt.Month == dtStart.Month)                {                   condition0 = true;                }


(Same problem in WL8)
0
80
1 Replies

Reply

Bookmark

Jump to End
Cone8
- ago
#1
Thanks for the report. We'll work that out right away.
I'm amazed that that bug (and another one in CompareDates) went undetected so long.
0

Reply

Bookmark

Jump to Top