Advertisement
Guest User

popstocks

a guest
Sep 10th, 2008
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #tickruler by popstocks, for 1min chart
  2.  
  3. declare lower;
  4. input m = 2.0;
  5. def length = 100 * m;
  6. declare zerobase;
  7. input sym = "/es";
  8. input tik = "$tick";
  9.  
  10. def short = -40;
  11. def long = 40;
  12.  
  13.  
  14. def a = Highest(high(sym), length);
  15. def c = Lowest(low(sym), length);
  16. def mark = 100 * (close(sym) - c) / (a - c);
  17.  
  18.  
  19.  
  20. def percentup = 105;
  21. def steady = TotalSum(if 1 == 1 then 1 else 0);
  22. def totalbars = steady + 1;
  23. def markv = (TotalSum(volume(sym)) / totalbars) * ((100 + percentup) / 100);
  24.  
  25.  
  26.  
  27. def aa = Highest(high(tik), length);
  28. def cc = Lowest(low(tik), length);
  29. def tikss = ((if close(tik) < open(tik) then low(tik) else high(tik)) - cc) / (aa - cc);
  30. def tiki = 100 * tikss;
  31.  
  32.  
  33. plot mmm = ((mark + tiki) - 100);
  34.  
  35.  
  36.  
  37. mmm.SetPaintingStrategy(paintingstrategy.histogram);
  38.  
  39. mmm.AssignValueColor(if mmm > 95 && volume(sym) then color.black else if mmm < short && volume(sym) > markv then color.red else if mmm > long && volume(sym) > markv then color.green else if AbsValue(mmm) > 10 && volume(sym) > markv then color.white
  40. else color.dark_gray);
  41.  
  42. mmm.SetLineWeight(2.0);
  43. mmm.hideBubble();
  44.  
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement