Dante2333

Untitled

Nov 7th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Buy function
  2. dataframe.loc[
  3. (
  4. (dataframe[‘close’].shift(1)<dataframe[‘bb_lowerband’]) &
  5. (dataframe[‘close’] > dataframe[‘bb_lowerband’]) &
  6. (dataframe[‘rsi’] < 50)
  7. ),
  8. ‘buy’] = 1
  9.  
  10. Sell function
  11.  
  12. dataframe.loc[
  13. (
  14. (dataframe[‘close’]>dataframe[‘bb_upperband’]) |
  15. (dataframe[‘rsi’] > 60)
  16. ),
  17. ‘sell’] = 1
Advertisement
Add Comment
Please, Sign In to add comment