PROTECTED SOURCE SCRIPT

OKX Perpetual Swap Position Sizer by RainbowLabs

I created this tool to simplify the process of setting up trading bots on OKX perpetual swap pairs via Alertatron.

Instead of manually searching for each pair on okx.com/trade-market/info/swap and calculating the position size from dollar to contract, I developed a Python bot to scrape the necessary data and built an indicator to convert that data into TradingView.

Simply input the desired order amount in USDT, and the indicator will calculate the maximum number of contracts that can be traded without exceeding the user-defined risk amount.

Please note that this indicator only works with OKX perpetual swap pairs and is intended for educational and informational purposes only.
It should not be construed as financial advice, and traders should always perform their own analysis and make their own decisions regarding whether or not to enter a trade.

This indicator requires human updates. As a result, the most recent coins may not be available until a new update is released.
educationalPine utilitiesPortfolio management

Protected script

This script is published closed-source and you may privately use it freely.

Want to use this script on a chart?

Disclaimer