Support Board
Date/Time: Tue, 27 Oct 2026 03:45:05 +0000
Post From: cannot get time in ATBB
| [2026-10-27 02:56:24] |
| User719512 - Posts: 516 |
|
Add the Bar Numbering study to your chart, set Bar Index input to Yes. Locate a bar where your signal should fire and note its index. Add to your code something like: if (sc.Index == 100) // whatever this # should be { int hour = 0; int minute = 0; int second = 0; SCDateTime barTime = sc.BaseDateTimeIn[sc.Index]; barTime.GetTimeHMS(hour, minute, second); SCString msg; msg.Format("%d, %d %d %d", sc.Index, hour, minute, second); sc.AddMessageToLog(msg, 1); } ...or if you build locally, set a breakpoint and inspect your code and find the bug. |
