When IsExit is used in a boolean expression such as in the above example, it is interpreted as a number (0 means false, 1 means true in all boolean conditions in RealTest).
When IsExit is used in a string expression such as in the following example and this is an exit, it is interpreted as a string containing the exit reason code from the trade list.
OrderExtra3: Format("{?}" if(IsExit, IsExit, ""))
This stores the exit reason string in the extra3 variable for OrdersTemplate output.