GetAppInfo: Difference between revisions
From MultiCharts
no edit summary
m (Reverted edits by 176.8.90.7 (talk) to last revision by JoshM) |
No edit summary |
||
Line 28: | Line 28: | ||
:'''aiAppId''' - returns an unique non-zero integer identifying the calling application. | :'''aiAppId''' - returns an unique non-zero integer identifying the calling application. | ||
:'''aiRealTimeCalc''' - returns a value of 1 if the calling application is performing calculation based on real-time | :'''aiRealTimeCalc''' - 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. | ||
== Notes == | |||
* GetAppInfo(aiRealTimeCalc) will also return a value of 1 when it's called during PlayBack mode '''or''' if the script uses [[RecalcLastBarAfter]]. | |||
For example: | |||
<syntaxhighlight> | |||
if (LastBarOnChart_s = True) then begin | |||
Print(FormatTime("HH:mm:ss - ", ELTimeToDateTime_s(CurrentTime_s)), | |||
"GetAppInfo(aiRealTimeCalc): ", GetAppInfo(aiRealTimeCalc)); | |||
RecalcLastBarAfter(2); | |||
end; | |||
</syntaxhighlight> | |||
Will return a value of 0 on the initialisation of the indicator (i.e. when it's started), but after that a value of 1 after each forced recalculation. | |||
<syntaxhighlight> | |||
07:17:54 - GetAppInfo(aiRealTimeCalc): 0.00 | |||
07:17:56 - GetAppInfo(aiRealTimeCalc): 1.00 | |||
07:17:58 - GetAppInfo(aiRealTimeCalc): 1.00 | |||
07:18:00 - GetAppInfo(aiRealTimeCalc): 1.00 | |||
</syntaxhighlight> | |||
== Examples == | == Examples == |