Jump to content
Medved Trader Forums

Leaderboard


Popular Content

Showing content with the highest reputation on 06/19/2019 in all areas

  1. 1 point
    with single sessioninfo call: public void MainCalculation() { TradingSessionInfo session = GetTradingSessionInfo(Timestamp); TimeSpan TS = (Timestamp[0] - session.SessionStart); // number of minutes into session int p = (int) TS.TotalMinutes; // convert Timespan to integer if (DateTime.UtcNow<session.DayStart.AddDays(1)) // only plot current day { SetColor(Color.Black); SetYValue(Sum(p,TICK)); //plots a running total using the Sum loop function } } NOTE: this code assumes that the paintbar is running on 1 minute bars. Could be optimized, though that would complicate the code a bit.
×
×
  • Create New...