Advertisement
retesere20

recycled-nt38478324

Aug 26th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. /*
  2. if (CurrentBar < 1) return;
  3. if (RenderOnDemand_) return;
  4. var ToTime_0 = ToTime(Time[0]);
  5.  
  6. if (false)
  7. {
  8. if (!UseCustomTimes_)
  9. {
  10. // on new bars session, find the next trading session
  11. if (Bars.IsFirstBarOfSession && null != sessionIterator)
  12. {
  13. // use the current bar time to calculate the next session
  14. sessionIterator.GetNextSession(Time[0], true);
  15.  
  16. // store the desired session information
  17. beginTime = sessionIterator.ActualSessionBegin;
  18. endTime = sessionIterator.ActualSessionEnd;
  19.  
  20. //beginTime = sess.BeginDay;
  21. //endTime = sessionIterator.ActualSessionEnd;
  22. }
  23. }
  24. }
  25.  
  26. var totimeStart = UseCustomTimes_ ? ToTime(StartingTime) : ToTime(beginTime);
  27. var totimeEnd = UseCustomTimes_ ? ToTime(EndingTime) : ToTime(endTime);
  28.  
  29. Brush backBrush = null;
  30. bool _inHoliday = Library_CH.insideHoliday(Time[0], this);
  31. bool _inSession = Library_CH.insideSession(Time[0], this);
  32. if (_inHoliday)
  33. {
  34. backBrush = HolidayColor_;
  35. }
  36. else if (_inSession)
  37. {
  38. backBrush = InsideSessionColor_;
  39. }
  40. else
  41. {
  42. backBrush = OutsideSessionColor_;
  43. }
  44. if (backBrush!=null)
  45. BackBrush = backBrush;
  46. var start = lastBrush != backBrush;
  47. if (start)
  48. {
  49. var LineBrush = _inHoliday ? HolidayColor_Vline : _inSession ? InsideSessionColor_Vline : OutsideSessionColor_Vline;
  50. Draw.VerticalLine(this, "start_end_" + CurrentBar, Time[0], LineBrush, vLineDashStyle, vLineWidth, false);
  51. }
  52. //
  53. lastBrush = backBrush;
  54. lastType = _inHoliday ? 1 : _inSession ? 2 : 3;
  55. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement