Support Board
Date/Time: Sat, 23 Nov 2024 04:10:03 +0000
Post From: BaseDateTimeIn and current time stamp
[2013-06-05 01:02:36] |
flyboy615 - Posts: 56 |
Hi Has something changed in recent released with transact bridge for the time reported in the BaseDateTimeIn array? I have several studies that seem to no longer work correctly since I upgraded in the last few releases. It seems that the BaseDateTimeIn now only reports the start time of the bar ( it may always have ) but I seem to think that it gives the time of the last tick. How do you get the time tick by tick on a 5 min chart in order that the following code would now work correctly? This is code that has been in place for years but just lately seems to no longer work correctly. It executes 1 bar late since the time stamp of the closing bar now reports 9:00:00 instead of 9:04:59. I can provide more information as needed. Thanks CurrentDateTime = sc.BaseDateTimeIn[sc.Index]; StartDateTime = COMBINE_DATE_TIME(CurrentDateTime.GetDate(),StartTime.GetTime()); EndDateTime = COMBINE_DATE_TIME(CurrentDateTime.GetDate(),EndTime.GetTime()); // start time = 9:00:00 // end time = 9:04:59 // HowManyMinutes = 30 if ((sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) && CurrentDateTime >= EndDateTime && CurrentDateTime <= ( EndDateTime+(HowManyMinutes.GetInt()*MINUTES)) { //do some processing } |