OmniTrader Professional Forum
-
OmniLanguage Discussion
omni language parameters and data types |
^ Top | ||
ProgrammerMike![]() Posts: 1 Joined: 1/14/2019 Location: Camano Island, WA ![]() | I'm just starting to get into omnilanguage. I've done a fair amount of programming my systems on Think Or Swim (TOS) platform using their scripting language (thinkscript). I'm unable to establish for sure whether certain features that I use in Thinkscript and are listed as VBA features are not available in Omnilanguage. I looked at the Omnitrader Pro manual as well as the help parts of omnitrader for omnilanguage. The references don't explicitly exclude the following but there is no explanation on how to use the features. 1. Does omnilanguage recogignize any type other than integer for #PARAM parameters? 2. Does omnilanguage support select/case? 3. Does omnilanguage support enumerated types? While there are workarounds for each of these using the integer type and if then else, they tend to be clunky and non-elegant. Any help would be appreciated. | |
^ Top | ||
Jim Dean![]() Posts: 3433 Joined: 3/13/2006 Location: L'ville, GA ![]() | 1. Params default to integer if their default and range specs are integers. If any of those four are floating, Params become single. (You can Dim integer, single, double, string, Boolean, and limited object. The integers are long integers btw (14 sig fig) 2. Does omnilanguage support select/case? Yes - and most of the nuanced dotNet case specs. 3. Does omnilanguage support enumerated types? No - but you can define a constant in a dim using = “string” or = value, etc. OL’s greatest limitation from a programming standpoint is the inability to declare arrays. Actually, in the underlying dotNET code, all declared variables are arrays which have a one dimensional size equal to the number of bars loaded. But OL is designed to prevent users from accidentally or on purpose referencing the “future” subscripts (ie later bars) of any of those implicit arrays. |