mikendo
Pine Script Rookie
Pine Script Rookie
Posts: 3
Joined: September 1st, 2022

Profits/Losses are not calculating correctly?

Hello. When I run my strategy in pinescript, it loads my profits in cents ($0.01) and it always says I gained or lost $0.01 regardless of the percent I have actually gained/lost. Example -0.71% of $1000 should be -$7.1 and a gain of 0.83% should be $8.3 My starting capital is $1000.

How can I fix this and further, what causes this?

Thanks!

Image
https://ibb.co/9tv7JbB

If needed I can add my code- but I wondered if anyone has run into this before.

Return to “Pine Script Q&A”