I'm not exactly sure what is going on here as I've seen near identical code working (different variable names) elsewhere in my script.
For context, I am trying to detect when a trendline (MidpointLine) crosses over an offset line (Offset1) and then assigning some values to variables associated with the date the line crosses over the offset.
With the code below, I'm receiving a 'Value never assigned to c1Date at...' error. I'm new to writing TS code and I would appreciate the help.
For context, I am trying to detect when a trendline (MidpointLine) crosses over an offset line (Offset1) and then assigning some values to variables associated with the date the line crosses over the offset.
With the code below, I'm receiving a 'Value never assigned to c1Date at...' error. I'm new to writing TS code and I would appreciate the help.
Code:
def c1Date;
if MidpointLine > Offset1 && MidpointLine[1] <= offset[1] {
c1Date = GetYYYYMMDD();
} else {}