Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- if (CurrentBar < 1) return;
- if (RenderOnDemand_) return;
- var ToTime_0 = ToTime(Time[0]);
- if (false)
- {
- if (!UseCustomTimes_)
- {
- // on new bars session, find the next trading session
- if (Bars.IsFirstBarOfSession && null != sessionIterator)
- {
- // use the current bar time to calculate the next session
- sessionIterator.GetNextSession(Time[0], true);
- // store the desired session information
- beginTime = sessionIterator.ActualSessionBegin;
- endTime = sessionIterator.ActualSessionEnd;
- //beginTime = sess.BeginDay;
- //endTime = sessionIterator.ActualSessionEnd;
- }
- }
- }
- var totimeStart = UseCustomTimes_ ? ToTime(StartingTime) : ToTime(beginTime);
- var totimeEnd = UseCustomTimes_ ? ToTime(EndingTime) : ToTime(endTime);
- Brush backBrush = null;
- bool _inHoliday = Library_CH.insideHoliday(Time[0], this);
- bool _inSession = Library_CH.insideSession(Time[0], this);
- if (_inHoliday)
- {
- backBrush = HolidayColor_;
- }
- else if (_inSession)
- {
- backBrush = InsideSessionColor_;
- }
- else
- {
- backBrush = OutsideSessionColor_;
- }
- if (backBrush!=null)
- BackBrush = backBrush;
- var start = lastBrush != backBrush;
- if (start)
- {
- var LineBrush = _inHoliday ? HolidayColor_Vline : _inSession ? InsideSessionColor_Vline : OutsideSessionColor_Vline;
- Draw.VerticalLine(this, "start_end_" + CurrentBar, Time[0], LineBrush, vLineDashStyle, vLineWidth, false);
- }
- //
- lastBrush = backBrush;
- lastType = _inHoliday ? 1 : _inSession ? 2 : 3;
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement