returns a value of 1 if the calling application is performing calculation based on real-time data. Will return a value of 0 in all other cases.
While this is true, it isn't true if RecalcLastBarAfter is used.
For example, this code..
Code: Select all
if (LastBarOnChart_s = True) then begin
Print(TimeNow, "SessionStart @ ", SessionStartTime(0, DayOfWeek(CurrentDate)),
", Last quote update: ", FormatTime("HH:mm:ss", ELTimeToDateTime_s(q_time_s)),
", aiRealTimeCalc: calculation based on ",
IffString(GetAppInfo(aiRealTimeCalc) = 1, "real-time data", "historical data"));
Code: Select all
23-04_06:30:42 SessionStart @ 800.00, Last quote update: 00:00:00, aiRealTimeCalc: calculation based on historical data
23-04_06:30:47 SessionStart @ 800.00, Last quote update: 00:00:00, aiRealTimeCalc: calculation based on real-time data
23-04_06:30:52 SessionStart @ 800.00, Last quote update: 00:00:00, aiRealTimeCalc: calculation based on real-time data
23-04_06:30:57 SessionStart @ 800.00, Last quote update: 00:00:00, aiRealTimeCalc: calculation based on real-time data
(MC 7.4 build 4096)
Where the first calculation is based on historical data (correct), while the next calculations say there is "real-time data", an hour and a half prior to the exchange opening. Also, the quote field (q_time_s) returns a zero, clearly indicating there is no real-time data.
Either there's a bug in aiRealTimeCalc, which causes RecalcLastBarAfter calculation to be seen as 'performing calculations based on real-time data', or there is some confusion on what "real-time data" actually means.
- Regardless of what causes this behavior, can it be fixed/changed so that the aiRealTimeCalc parameter actually returns a 1 when there is "real" incoming real-time data?
Because the way it's working now, with RecalcLastBarAfter causing "real-time data" according to aiRealTimeCalc, the aiRealTimeCalc parameter is not useful since even if this reserved word says "real-time data", we still can't be sure there's actual real-time data coming in.