×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

GetAppInfo

772 bytes added, 06:25, 19 February 2012
no edit summary
:'''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 data or on PlayBack 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.0007:17:56 - GetAppInfo(aiRealTimeCalc): 1.0007:17:58 - GetAppInfo(aiRealTimeCalc): 1.0007:18:00 - GetAppInfo(aiRealTimeCalc): 1.00</syntaxhighlight>
== Examples ==