Unable to see WriteIF correctly

Unable to see the Remarks even though the condition is met.
Expectation: Should see "RS Crossover"
Current behavior: Blank


_SECTION_BEGIN("RS Crossover");

CompIndex = Foreign( "^NSEI", "C" ); // Comparing other indices
RS = Close / CompIndex;
RSMavg21 = MA(RS, 21);
RSMavg5 = MA(RS, 5);

RSCross = Cross(RS,RSMavg21); 

RSCon = IIf( RSCross, True, False );
Remarks = WriteIf( RSCon, "RS Crossover","");


Filter = RSCon;

AddtextColumn( Remarks, "Setup Condition", 1);
1 Like

I am trying to identify the point in red circle.

On debugging i am seeing only null values for RSCross

  1. In the Watch window, use "ARRAYS" tab - it shows values of entire arrays.
  2. WriteIf() uses Selected Value as explained in the manual

Quote from manual:
Please note that WriteIf returns just single string representing current SelectedValue of the EXPRESSION

In Analysis SelectedValue is LAST bar of analysis period ("Range").
In Chart, SelectedValue it is the date that is selected by the user by vertical line (click).


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.