BTCUSDSHORTS and BTCUSDLONGS are like datasets provided by Bitfinex exchange. They record the number of margined for longs and shorts and they are measured in BTC (in case using BTCUSD ).
Margin is Like any loan, the borrower may pay interest while the loan is outstanding, and must eventually pay the loan back.
Red Area: More short margin than long margin.
Green...
Thank to @mortdiggiddy
original script:
Chart the multi-day Volume Weighted Average Price ( VWAP ). Normally, the VWAP is tracked for the current day, from the first bar of the day (regular or extended session). The VWAP shows the current value of:
-> sum(hlc3 * volume , barsForDay) / sum( volume , barsForDay),
-> where 'barsForDay' is the total number bars...