My strategy, on the chart, shows visible wins. Yet, on the metrics of the strategy in TradingView, it shows no wins.
For example, this is a short the strategy has taken. For clarity, the red line is the stop loss, the dashed line is the entry and the green line is the take profit, all of which are calculated in the example code below:
It appears that the risk is -57, and the profit is +57, which is 0, right? Is this why it's not showing as a win?
This is the above trade shown within TradingView:
The intention, is for a R:R of 1:3.
This is the code that is for the shorts and the calculation for the take profit:
strategy("Strategy", overlay=true, max_bars_back=5000,
initial_capital=10000,
default_qty_type=strategy.percent_of_equity,
default_qty_value=5,
commission_type=strategy.commission.cash_per_order,
commission_value=2,
pyramiding=0,
slippage=2)
takeProfit = entry + (entry - stopLoss) * i_riskRewardRatio
strategy.entry("Short", strategy.short, limit=bearishEQ)
strategy.exit("Short Exit", "Short", stop=pendingStopPrice, limit=takeProfit)
Any help would be greatly appreciated. Many thanks.

