Undocumented EL reserved words; what do they do?

Questions about MultiCharts and user contributed studies.
User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Undocumented EL reserved words; what do they do?

Postby JoshM » 29 Oct 2011

Just curious about some undocumented words I ran across, and couldn't find any/much documentation on these (on the forum or in the documentation pdfs).

Const
Added a keyword ‘const’ to PowerLanguage, which allows you to define the size of an array.
Source

Does someone knows a usage example for this? I thought something like the following, which is not correct:

Code: Select all

Arrays:
myIntArray[const 10](0);
const myIntArray[10](0);
aiMainWindowHandle
Usage example:

Code: Select all

Print(GetAppInfo(aiMainWindowHandle));
..which returns me a value of '1049420.00'. What does this value, and the aiMainWindowHandle keyword, mean?

Sidenote
Related to the GetAppInfo() reserved word: why does GetAppInfo(aiApplicationType) returns a zero when called in the Portfolio Backtester? A value of zero means "unknown", but for programming purposes I'd rather see a fixed numeric value (say, 3), since an unknown value can be triggered for more than one reason than the Portfolio Backtester application environment if I'm correct.


Btw, if you have any other undocumented reserved words, add them to this thread. I'd definitely like to know them to become more proficient in EasyLanguage, and other forum users might be interested as well. :)

Regards,
Josh

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Undocumented EL reserved words; what do they do?

Postby TJ » 29 Oct 2011

Undocumented reserved words are new additions that are still under testing and not yet ready for prime time.
It is ok if you want to experiment,
but not for those who wants to trade.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Undocumented EL reserved words; what do they do?

Postby Henry MultiСharts » 01 Nov 2011

const: var0(10); constant declaration var0 of 10
Sample code:

Code: Select all

const: var0(10);
array: arr0[var0](0);
The script would not compile if a regular variable is used:

Code: Select all

variable: var0(10);
array: arr0[var0](0);
aiMainWindowHandle-returns handle of the main window (each Windows window object has a unique identificator within current process).
aiApplicationType returns 1 - for the chart window, 2 - for the scanner window.


Return to “MultiCharts”