GetAppInfo: Difference between revisions
From MultiCharts
No edit summary |
No edit summary |
||
Line 39: | Line 39: | ||
<syntaxhighlight>GetAppInfo(aiRealTimeCalc)</syntaxhighlight> | <syntaxhighlight>GetAppInfo(aiRealTimeCalc)</syntaxhighlight> | ||
Will return a value of 1 if the calling application’s calculations are based on real-time or PlayBack data; otherwise, will return a value of 0. | Will return a value of 1 if the calling application’s calculations are based on real-time or PlayBack data; otherwise, will return a value of 0. | ||
=== Using GetAppInfo to get information about the Chart Window === | |||
The example below uses the [[Print]] keyword to print information about the current [[Chart_Window|Chart Window]] to the PowerLanguage Editor output log: | |||
<syntaxhighlight> | |||
// Example: Getting data about the chart window using GetAppInfo | |||
if LastBarOnChart_s = True then begin | |||
Print("The leftmost date on this chart is ", FormatDate("MM/dd/yyyy", GetAppInfo(aiLeftDispDateTime)), | |||
", and the rightmost date on this chart is ", FormatDate("MM/dd/yyyy", GetAppInfo(aiRightDispDateTime))); | |||
Print(NewLine, | |||
"The leftmost bar closes at ", FormatTime("HH:mm:ss", GetAppInfo(aiLeftDispDateTime)), | |||
" and the rightmost bar closes at ", FormatTime("HH:mm:ss", GetAppInfo(aiRightDispDateTime)) ); | |||
Print(NewLine, | |||
"The highest price on the Y axis (price scale) is ", NumToStr( GetAppInfo(aiHighestDispValue), 0), | |||
" and the lowest price on the same axis is ", NumToStr( GetAppInfo(aiLowestDispValue), 0)); | |||
end; | |||
</syntaxhighlight> | |||
This would give an output similar to: | |||
<syntaxhighlight> | |||
The leftmost date on this chart is 01/20/2012, and the rightmost date on this chart is 01/20/2012 | |||
The leftmost bar closes at 12:31:16 and the rightmost bar closes at 21:56:15 | |||
The highest price on the Y axis (price scale) is 2438 and the lowest price on the same axis is 2411 | |||
</syntaxhighlight> | |||
[[Category:Environment Information]] | [[Category:Environment Information]] |