1

Pinescript now states after compiling:

The script uses a deprecated overload of strategy.close() with a when 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')
    ...
DSDmark
  • 1,045
  • 5
  • 11
  • 25
krueger17
  • 11
  • 1

1 Answers1

0

This is an workaround seen in the PineCoders Pine Scriptâ„¢ Q&A

add immediately = true

Something like that:

if exit_long
    strategy.close('golong', immediately = true)
Gu5tavo71
  • 706
  • 1
  • 4
  • 11