1. 首页
  2. 易语言 - EasyLanguage
  3. TradeStation 9 Coding Gotchas

TradeStation 9 Coding Gotchas

  1. All new array based coding starts at element ‘0’. This is different from Arrays in TradeStation 8 which started at element ‘1’. This doesn’t refer to ‘Arrays’ (which remain exactly the same from TS8 to TS9) but to other array based coding.
  2. Variables that are set/written to within Methods must be declared as IntrabarPersist.
  3. The word ‘global’ now has several different, confusing meanings:
    • If you declare a variable at the top of your code then that variable is ‘global’ to all parts of your code, including Methods (as opposed to variables declared within Methods, which are ‘local’ to that Method).
    • TradeStation 9 also includes a built in global variable called GlobalDictionary, which is shared outside of the current indicator/strategy. See the GlobalDictionary page for more infomation about how to implement GlobalDictionary to share data between indicators and strategies, and the limitations imposed when doing so.
    • And we still have Global Variables, the DLL-based product where a global variable is truly global amongst all TradeStation applications, and to other applications running on your PC.
  4. Methods must be declared after Inputs and Variables declarations, but before the actual code starts. Otherwise you will get the Verify error “invalid method declaration inside main method”.
  5. The rules for Code run sequence on startup in OOEL is something to consider carefully. See the Programming Notes section below.
更新于 2020年2月24日

这篇文章对您有帮助吗?

相关的话题

留言评论