PINE LIBRARY

Margin/Leverage Calculation

1382
Margin
This library calculates margin liquidation prices and quantities for long and short positions in your strategies.

Usage example


Get the qty for margin long or short position.


Get the price and qty for margin long or short position.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.