MCPcopy Create free account
hub / github.com/TraderOracle/ATAS / MarkOvernightSession

Method MarkOvernightSession

Defibrillator.cs:171–194  ·  view source on GitHub ↗
(int bar)

Source from the content-addressed store, hash-verified

169 }
170
171 private void MarkOvernightSession(int bar)
172 {
173 _highS = "1";
174 _lowS = "0";
175
176 var candle = GetCandle(bar);
177 var diff = InstrumentInfo.TimeZone;
178 var time = candle.Time.AddHours(diff);
179
180 if ((time.Minute >= 0 && time.Hour >= 17 && time.Hour <= 24) ||
181 (time.Minute >= 0 && time.Hour >= 0 && time.Hour <= 7))
182 {
183 if (candle.High > _highest)
184 {
185 _highest = candle.High;
186 _highBar = bar;
187 }
188 if (candle.Low < _lowest)
189 {
190 _lowest = candle.Low;
191 _lowBar = bar;
192 }
193 }
194 }
195
196 protected override void OnCalculate(int bar, decimal value)
197 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected