AnthonyAlexander

Investor Sentiment- Completed

Jan 3rd, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. //@version=3
  2. study("Investor Sentiment")
  3.  
  4. x_3_5 = ema(close,3) + ema(close,5)
  5. x_8_10 = ema(close,8) + ema(close,10)
  6. x_12_15 = ema(close,12) + ema(close,15)
  7. x_3_10 = x_3_5 + x_8_10
  8. x_3_15 = x_3_10 + x_12_15
  9.  
  10. x_30_35 = ema(close,30) + ema(close,35)
  11. x_40_45 = ema(close,40) + ema(close,45)
  12. x_50_60 = ema(close,50) + ema(close,60)
  13. x_30_45 = x_30_35 + x_40_45
  14. x_30_60 = x_30_45 + x_50_60
  15.  
  16. x_3_60 = x_3_15 - x_30_60
  17. osc = x_3_60 * 10
  18. hline(0)
  19.  
  20. x_color = osc >= 0 ? green:red
  21. plot(osc,color=x_color,linewidth=2,style=histogram,transp=5)
  22.  
  23. alertcondition(osc > 0, title='Sentiment Has Turned Positive', message='Sentiment Has Turned Positive!')
  24. alertcondition(osc < 0, title='Sentiment Has Turned Negative', message='Sentiment Has Turned Negative!')
Advertisement
Add Comment
Please, Sign In to add comment