Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. //@version=3
  2. study("Effeciency")
  3. // MADE BY MVPMC // DISCORD CMYK
  4. // Effeciency is the Movement divided by the force required.
  5. // Bullish means, it moves up easier than down
  6. // Bearish means, it moves down easier than up
  7. // But also the amount of force (volume) and if it increases/decreases matters
  8. transp = #00000000
  9. xgreen = #00FFCC66
  10. xred = #FF222266
  11. xblack = #000000FF
  12.  
  13. x = input(1)
  14. y = input(50)
  15. z = input(minval=1,defval=1.10, step=0.1,title='threshold')
  16.  
  17. PRICEMOVEMENT = close[x] - close
  18. VOLMOVEMENT = sma(volume,x)
  19. EFFMOVEMENT = PRICEMOVEMENT / VOLMOVEMENT
  20.  
  21. UPP = EFFMOVEMENT > 0 ? EFFMOVEMENT : 0
  22. DOW = EFFMOVEMENT < 0 ? EFFMOVEMENT : 0
  23.  
  24. SMAUPP = sma(UPP,y)
  25. SMADOW = sma(DOW,y)
  26. SMABASE = SMAUPP > -SMADOW ? -SMADOW : SMAUPP < -SMADOW ? SMAUPP : SMAUPP
  27.  
  28. BGCOLOR = SMAUPP > (z * -SMADOW) ? xred : ( z * SMAUPP ) < -SMADOW ? xgreen : transp
  29.  
  30. bgcolor(BGCOLOR)
  31.  
  32. plot(SMAUPP, color=xred,style=histogram)
  33. plot(-SMADOW, color=xgreen,style=histogram)
  34. plot(SMABASE, color=xblack,style=histogram)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement