TradingView
CAB_Member
Oct 30, 2018 7:29 PM

Gain Loss V2 

Bitcoin / US Dollar Perpetual Inverse Swap ContractBitMEX

Description

This is the Version Two of my Gain/Loss percent indicator, it's really simple but very handy indicator, when you go into a position, most of the time during a day trade, you don't have enough time to sit back and calculate the percentage of your gain or loss specially with maker/taker fee and leverage and sometimes funding fee you should pay the exchanges/brokers.
The default values for maker/taker and funding fees are set as you would encounter in Bitmex exchange. every 8 hours you are in position, you should rise the number of funding you pay by one, The rest will be calculated automatically.
Normally you need to set the fees for maker/taker and fund based on what your broker/exchange tells you once, then each trade, you set your entry point, being it a margin trade or not, and finally if it's margin, the direction and the leverage and that would be it.
Again, most of the time traders don't change their leverages, so you would set it for once and after that, you just set the entry, click the direction boolean and that is it.
The source is hidded but every one can use the script.

Release Notes

Fixed a small typo in the parameter title

Release Notes

This is the new version, utilizing the pine version 4's label command, instead of drawing an indicator we simply show a label, loss beyond - 100% will show "LIQUIDATED" word instead of percentage.
Comments
CAB_Member
pwestling
It seems there's a bug in the script where marking a position as short does not invert the displayed value. Thanks for the great script!
More