Pinescript now states after compiling:
The script uses a deprecated overload of
strategy.close()
with awhen
parameter as the second argument. When calling this function with only positional arguments, use a string for the second argument to avoid unexpected results.
However, there is no when
as second argument to the strategy.close()
call. The warning message relates to the following lines:
if exit_long
strategy.close('golong')
...