The VWAP strategy calculates the Volume Weighted Average Price (VWAP) and uses various indicators to determine buy and sell signals. In the populate_indicators function, the strategy calculates the VWAP and adds it to the dataframe. It also computes other indicators such as the top percent change, CTI (Close-to-Indicator), RSI (Relative Strength Index), and Bollinger Bands.
The populate_buy_trend function sets a buy tag to 'vwap' and identifies potential buy signals based on several conditions.
These conditions include the close price being below the VWAP low, the top percent change being greater than 0.04, CTI being less than -0.8, RSI being below 35, RSI_84 being below 60, RSI_112 being below 60, and the volume being greater than 0.
If these conditions are met, the 'buy' column is set to 1. The populate_sell_trend function sets the 'sell' column to 1 for all rows, indicating a potential sell signal. Overall, the VWAP strategy uses the VWAP and various indicators to generate buy and sell signals based on predefined conditions.