I'm trying to code a take profit based on the currently open profit as percentage. The documentation for strategy.openprofit
does not yield much information. It only says that the number is a float. Is this open profit the profit in the so called "base" currency? Is there a function I'm missing that would give the open profit in percent directly?
This library contains exitPercent
function. I suppose this is what you are looking for.