It looks like you're new here. If you want to get involved, click one of these buttons!
if ((DateTime.Now.TimeOfDay > DataHelpers.RoundUp(starttym, TimeSpan.FromMinutes(checktime)))) //|| !data) { starttym = DateTime.Now.TimeOfDay; priceprev = price; price = Convert.ToDouble(temp.Ltp)/100; if (!data) { priceprev = price; data = true; } JToken qutarr = xquote.GetQuote(ticker, "minute", true, noofdaybak); var min = (double) qutarr[(int) DataHelpers.Ohlc.Low]; var max = (double) qutarr[(int) DataHelpers.Ohlc.High]; double pivot = (min + max)/2; double atr = xindicator.Atr(periods, "minute", ticker, true, noofdaybak); double uppertmp = pivot + multiplier*atr; double lowertmp = pivot - multiplier*atr; if ((uppertmp < upper) || (priceprev > upper)) { upper = uppertmp; } if ((lowertmp > lower) || (priceprev < lower)) { lower = lowertmp; } Console.WriteLine(scriptname); Console.WriteLine("upper" + upper); Console.WriteLine("lower" + lower); Console.WriteLine(DateTime.Now.TimeOfDay); }