Guest User

wyckoff indicator

a guest
Dec 15th, 2022
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. // Wyckoff zones
  2. enum WyckoffZone {
  3. Accumulation,
  4. Caution,
  5. Distribution,
  6. Spring,
  7. Shakeout,
  8. AutomaticRally,
  9. SignOfStrength,
  10. Weakness
  11. }
  12.  
  13. // Function to determine Wyckoff zone
  14. function wyckoffZone(open, close, high, low)
  15. // Determine current Wyckoff phase
  16. if close > open and high > low // uptrend
  17. phase = WyckoffPhase.Markup
  18. else if close < open and high > low // downtrend
  19. phase = WyckoffPhase.Markdown
  20. else if close > open and high < low // distribution
  21. phase = WyckoffPhase.Distribution
  22. else if close < open and high < low // accumulation
  23. phase = WyckoffPhase.Accumulation
  24.  
  25. // Determine potential future Wyckoff zone based on current phase
  26. if phase == WyckoffPhase.Markup
  27. return WyckoffZone.Caution
  28. else if phase == WyckoffPhase.Markdown
  29. return WyckoffZone.Spring
  30. else if phase == WyckoffPhase.Distribution
  31. return WyckoffZone.Shakeout
  32. else if phase == WyckoffPhase.Accumulation
  33. return WyckoffZone.AutomaticRally
  34. }
  35.  
  36. // Candlestick chart
  37. plot(wyckoffZone(open, close, high, low))
  38.  
Advertisement
Add Comment
Please, Sign In to add comment