Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Buy function
- dataframe.loc[
- (
- (dataframe[‘close’].shift(1)<dataframe[‘bb_lowerband’]) &
- (dataframe[‘close’] > dataframe[‘bb_lowerband’]) &
- (dataframe[‘rsi’] < 50)
- ),
- ‘buy’] = 1
- Sell function
- dataframe.loc[
- (
- (dataframe[‘close’]>dataframe[‘bb_upperband’]) |
- (dataframe[‘rsi’] > 60)
- ),
- ‘sell’] = 1
Advertisement
Add Comment
Please, Sign In to add comment