Open 0x4007 opened 1 year ago
I'll add lower priority issues after we get this started. There's a handful of adjustments that still need to be made, including ensuring calculation accuracy; and verifying the instrument being charted (my ETH-USDC LP indicator is plotting on every chart.)
Dynamic Data Input on TradingView Indicator
The first major engineering challenge in order for this to be useful in realtime decision making is to allow for the script to have the capability to dynamically read position data from external data sources. I did quite a bit of research on this, and it appears that TradingView's PineScript does not currently have this capability.
Currently the variables must be manually input on the indicator. This can be done by double clicking the indicator on TradingView.
Those variables are manually imported off of the data presented by Revert's UI
https://revert.finance/#/uniswap-position/mainnet/312741
The founder of Revert passed me along this draft documentation of their private API. This was current as of 12 July 2022, as such there may have been some changes introduced since. This will allow you to access the information in JSON format.
apidocs.md
Research
I would encourage you to explore workarounds.
Workaround Strategy A - API Reverse Engineering
I would highly recommend API reverse engineering so that there is FAR LESS infrastructure to support for this capability. Then we could have a super simple node program that simply pings Revert (GET) and TradingView (POST) APIs every minute or so.
Workaround Strategy B - Scraper
Have a remote invoked scraper to manually log in to your TradingView account, and