retesere20

possible_upticks

Sep 1st, 2018
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #these fixes needs a better fix,but at this moment, i'm stuck
  3.  
  4. def range_rmnt = (2+(Range*Range)/10)* Range;
  5. def range_rmnt_fix = if (absvalue(range_rmnt)<almostZero, range_rmnt+ticksize, range_rmnt);
  6. def temp_val_1 = range_rmnt_fix + (open - close);
  7. def divider_fix_u = if (absvalue(temp_val_1)<almostZero, temp_val_1+ticksize, temp_val_1);
  8.  
  9.  
  10. def possible_upticks =
  11. if green_bar then
  12. vol_tick * ( Range/divider_fix_u)
  13. else
  14. vol_tick * ((Range + close - open) / range_rmnt_fix + (close - open))
  15. ;
RAW Paste Data