Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 12:12:09 +0000



[Programming Help] - New Trade Sim Environment and ACSIL auto-trade settings

View Count: 618

[2021-05-14 19:41:38]
User275839 - Posts: 57
Hello -

I'm very excited to use the new SC Trade Sim system you recently opened up.

My question is: I'm working on a ACSIL auto-trade system, and I have my Data/Trade Service set to "Trading Evaluator". In this case, what is the correct setting for the sc.SendOrdersToTradeService flag in the ACSIL study?

Of course I don't want to execute real trades when I'm testing the system, but because my Service is set to the new SC Trade Sim environment should sc.SendOrdersToTradeService be true or false?

Please advise. Thank you!
[2021-05-15 13:55:35]
bradh - Posts: 854
should sc.SendOrdersToTradeService be true or false?

True, unless you are backtesting.
[2021-05-16 20:23:58]
User275839 - Posts: 57
Hi -

Thanks for the quick response. I am ready now to conduct some backtesting and have my service set to "Trading Evaluator".

I am following the steps listed here: Auto Trade System Back Testing: Replay Back Testing - Automatic

and am finding the steps somewhat confusing...

Could you clarify the following for me?

1) Step 3 says to check "Trade >> Auto Trading Enabled", but there are 2 menu items with that wording -- "Global" and "Chart". Which should I choose?

2) If I try to check "Trade >> Trade Simulation Mode On" I get this error in the log: "Service client does not support enabling Trade Simulation Mode". What should this menu item setting be if I'm working with the SC Trade Sim service?

3) Step 1 says to disconnect from the service, then Step 2 says to load data... which immediately reconnects to the service. For backtesting, should I be connected to the SC service or not?

4) In my ACSIL code I have sc.SendOrdersToTradeService set to false. Is this OK for backtesting with the SC Trade Sim service?

5) Choosing "Trade >> Auto Trade System Replay Back Test" results in the same error as in Q2 above: "Service client does not support enabling Trade Simulation Mode". How can I do backtesting with the SC Trade Sim service (Trading Evaluator)??

Thank you! :)
[2021-05-16 21:27:51]
bradh - Posts: 854
1) Step 3 says to check "Trade >> Auto Trading Enabled", but there are 2 menu items with that wording -- "Global" and "Chart". Which should I choose?

You need both enabled to auto trade specific charts. Global is for all open chartbooks, chart is for the specific chart.

2) If I try to check "Trade >> Trade Simulation Mode On" I get this error in the log: "Service client does not support enabling Trade Simulation Mode". What should this menu item setting be if I'm working with the SC Trade Sim service?

Trade Simulation Mode does not use the Trading Evaluator Service. It is a simulated exchange in the application on your computer. It is primarily for back testing, but can also be used in forward testing.

When you turn off Trade Simulation Mode, you are trading with a live exchange, in this case the Trading Evaluator Service, which like a real exchange, is not on your computer, has trading accounts that can not be simply deleted, and it only uses live (or delayed) data. Think of it as a Live Paper Money account. This mode is not for backtesting. It is primarily for forward testing under more realistic conditions than your back test simulator uses.

3) Step 1 says to disconnect from the service, then Step 2 says to load data... which immediately reconnects to the service. For backtesting, should I be connected to the SC service or not?

When connected to any service, you are receiving live or delayed data. When back testing, you are using previously saved or retrieved data. In either case you need to be connected to a service. You don't need to connect to the Trading Evaluator Service to do backtesting.

4) In my ACSIL code I have sc.SendOrdersToTradeService set to false. Is this OK for backtesting with the SC Trade Sim service?

Yes. You can use this statement to automatically change this setting when you switch back and forth between Sim and Live.

sc.SendOrdersToTradeService = !sc.GlobalTradeSimulationIsOn;

5) Choosing "Trade >> Auto Trade System Replay Back Test" results in the same error as in Q2 above: "Service client does not support enabling Trade Simulation Mode". How can I do backtesting with the SC Trade Sim service (Trading Evaluator)??

You don't. You use Trade Simulation Mode for backtest, not the Trading Evaluator service.
[2021-05-16 22:16:19]
User275839 - Posts: 57
Thank you again for the prompt response. :)

And thank you for the clarifying details.

I am unblocked now and have begun doing some intraday backtesting in replay mode.
[2021-05-21 05:58:42]
User275839 - Posts: 57
Oh! One confirmation if I may...

4) In my ACSIL code I have sc.SendOrdersToTradeService set to false. Is this OK for backtesting with the SC Trade Sim service?

Yes. You can use this statement to automatically change this setting when you switch back and forth between Sim and Live.

sc.SendOrdersToTradeService = !sc.GlobalTradeSimulationIsOn;

Should the above line be INSIDE or OUTSIDE (or both?) the if (sc.SetDefaults) scope? I'm imagining it should be OUTSIDE otherwise it won't get evaluated in all situations?

Which is correct?

Thanks
[2021-05-21 11:10:29]
bradh - Posts: 854
Outside works fine.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account