When do I call CONNECT function in TradeStation multiple scripts?
Posted: Sat Mar 17, 2018 4:54 am
Hello,
Let's assume we setup TradeStation (TS) platform to run all Charts via just ONE single process (and therefore only 1 TWS-Link instance is loaded). Let's then assume we have TS EasyLanguage Script 1, Script 2 and Script 3. Script 1 is attached to Gold chart in TS workspace number 1. Script 2 is attached to ES chart in TS workspace number 2. And script 3 is attached to Natural Gas chart in TS workspace number 3. Do I call the CONNECT ("", 7496, 1 ,500) function in just the "first" script which is called script 1? Or must I call CONNECT function within script 1, script 2 and script 3? When TS starts up it will load all 3 scripts, one-by-one, TS will use only 1 process for charting. Please also note that in each different TS script after calling CONNECT function I will then be calling the REGISTER_CONTRACT function to get the contract ID number, before placing orders.
Also if I have 100 sub-accounts and 1 master account, within the CONNECT ("",7496,1 ,500) function is 500ms long enough time to call account details for all 100 sub-accounts, or should I use 7000ms instead i.e. CONNECT ("192.166.0.2",7496,1 ,7000)? I think the level of account detail is set to "Summary".
Thanks in advance.
Regards, Rod.
Let's assume we setup TradeStation (TS) platform to run all Charts via just ONE single process (and therefore only 1 TWS-Link instance is loaded). Let's then assume we have TS EasyLanguage Script 1, Script 2 and Script 3. Script 1 is attached to Gold chart in TS workspace number 1. Script 2 is attached to ES chart in TS workspace number 2. And script 3 is attached to Natural Gas chart in TS workspace number 3. Do I call the CONNECT ("", 7496, 1 ,500) function in just the "first" script which is called script 1? Or must I call CONNECT function within script 1, script 2 and script 3? When TS starts up it will load all 3 scripts, one-by-one, TS will use only 1 process for charting. Please also note that in each different TS script after calling CONNECT function I will then be calling the REGISTER_CONTRACT function to get the contract ID number, before placing orders.
Also if I have 100 sub-accounts and 1 master account, within the CONNECT ("",7496,1 ,500) function is 500ms long enough time to call account details for all 100 sub-accounts, or should I use 7000ms instead i.e. CONNECT ("192.166.0.2",7496,1 ,7000)? I think the level of account detail is set to "Summary".
Thanks in advance.
Regards, Rod.