Guest User

Green Dragon June 2015

a guest
Jun 21st, 2015
740
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. # litepresence
  2. # june 21 2015
  3. # Green Dragon Begins Today
  4.  
  5.  
  6. PAIR = pairs.btc_usd
  7.  
  8. def tick():
  9.  
  10. ma2 = data[PAIR].ma(2)
  11. ma30 = data[PAIR].ma(30)
  12. ma60 = data[PAIR].ma(60)
  13. ma90 = data[PAIR].ma(90)
  14. ma150 = data[PAIR].ma(150)
  15. ma30i = data[PAIR][-1].ma(30)
  16. ma60i = data[PAIR][-1].ma(60)
  17. ma90i = data[PAIR][-1].ma(90)
  18. ma150i = data[PAIR][-1].ma(150)
  19.  
  20.  
  21. # GREEN DRAGON CURRENT STATE 6/21/2015
  22.  
  23. green_dragon = 0
  24. if ((ma30 > ma60) and # True
  25. (ma60 > ma90) and # False, but converging
  26. (ma90 > ma150) and # True
  27. (ma2 > ma30) and # True
  28. (ma30 > Decimal(1.002) * ma30i) and # True
  29. (ma60 > Decimal(1.002) * ma60i) and # True
  30. (ma90 > Decimal(1.002) * ma90i)): # False, but rising
  31. green_dragon = 1
  32.  
  33.  
  34. plot('green_dragon', green_dragon, secondary=True)
  35. plot('green_dragon', 0, secondary=True)
  36. plot('o', 0, secondary=True)
  37.  
  38. if info.tick == 0:
  39. plot('z', -20, secondary=True)
Advertisement
Add Comment
Please, Sign In to add comment