Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 14:35:02 +0000



Cannot get Live “Spreadsheet System for Trading” trade to occur in Simulation Mode Replay

View Count: 338

[2023-02-02 23:22:15]
PeaceFrog - Posts: 105
Hello,

Thank you for taking the time to answer my question.

Today, I was running a Live “Spreadsheet System for Trading” and a BuyEntry and BuyExit order were sent and filled. When I reviewed this set of transactions in the “Trade Activity Log” I noticed that the BuyEntry and BuyExit basically occurred at the same time (within the same second), so, during the hour that the market was closed I turned “Simulation Mode” On and replayed the time period when the transactions occurred and I could not get them to occur.

I’m stumped by this. In the “Replay Chart” I used Replay Mode “Calculate At Every Tick/ Trade (High CPU Usage)" and replayed at Speed 1 and when that didn’t cause the transactions to occur I also used the “Jump” Method “By Number of Trades”, “Unit” “1” and tapped the “>>” button through the transaction time period but still couldn’t get them to occur.

Kindly advise. Thank you very much.
[2023-02-04 00:55:52]
Sierra_Chart Engineering - Posts: 17228
From our perspective this is really impossible for us to be able to answer. This would involve very involved debugging/troubleshooting/analysis:
Automated Trading Management: Troubleshooting Automated Trading System Behavior
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-02-04 01:26:51]
PeaceFrog - Posts: 105
Here are the Trade Activity and Service Logs from the time of the transactions:

Trade Activity Log:
ActivityType  Symbol  DateTime  OrderActionSource  OrderStatus  BuySell  OrderType  Quantity  Price  OpenClose  FillPrice  Price2  FilledQuantity  InternalOrderID  ServiceOrderID  TradeAccount  ParentInternalOrderID  PositionQuantity  FillExecutionServiceID  HighDuringPosition  LowDuringPosition  Note  AccountBalance  ExchangeOrderID  ClientOrderID  TimeInForce

Orders    2023-02-02 06:20:39.350836  End of full open orders update from service. TradeAccount: No account specified  Unspecified                      None              0.00      Day


Orders  F.US.CA6H23  2023-02-02 08:10:01.249708  Auto-trade: F.US.CA6H23[M] 10 Min #2 | CA6 - H23 - 1030ADX | BuyEntry | Formula: Buy Entry at row 3 is TRUE. | Bar start date-time: 2023-02-02 08:10:00.000 | Last: 0.752 | AO=0  Order Sent  Buy  Limit  1  0.75200  Open        122121    91648              0.00      Day

Orders  F.US.CA6H23  2023-02-02 08:10:01.380437  CQG order update. Status: IN_TRANSIT  Pending Open  Buy  Limit  1  0.75200  Open        122121  619453518  91648              0.00    122121.23120  Day

Orders  F.US.CA6H23  2023-02-02 08:10:01.380635  CQG order update. Status: ACK_PLACE  Open  Buy  Limit  1  0.75200  Open        122121  619453518  91648              0.00    122121.23120  Day

Positions  F.US.CA6H23  2023-02-02 08:10:01.451794  Updated Service Position Quantity to 1  Unspecified                      91648              0.00      

Orders  F.US.CA6H23  2023-02-02 08:10:01.451833  CQG order update. Status: FILL  Filled  Buy  Limit  1  0.75200  Open  0.75200    1  122121  619453518  91648      54735259149        0.00    122121.23120  Day

Positions  F.US.CA6H23  2023-02-02 08:10:01.451834  Updated Internal Position Quantity to 1. Previous: 0  Unspecified      1                91648    1          0.00      

Fills  F.US.CA6H23  2023-02-02 08:10:01.451835  CQG order update. Status: FILL  Filled  Buy  Limit  1  0.75200  Open  0.75200    1  122121  619453518  91648    1  54735259149        0.00    122121.23120  Day

Orders  F.US.CA6H23  2023-02-02 08:10:01.748649  Auto-trade: F.US.CA6H23[M] 10 Min #2 | CA6 - H23 - 1030ADX | BuyExit | Formula: Buy Exit (Sell) at row 3 is TRUE. | Bar start date-time: 2023-02-02 08:10:00.000 | Last: 0.752 | AO=0  Order Sent  Sell  Limit  1  0.75195  Close        122122    91648    1          0.00      Day

Orders  F.US.CA6H23  2023-02-02 08:10:01.872531  CQG order update. Status: IN_TRANSIT  Pending Open  Sell  Limit  1  0.75195  Close        122122  619488182  91648    1          0.00    122122.44705  Day

Orders  F.US.CA6H23  2023-02-02 08:10:01.872786  CQG order update. Status: ACK_PLACE  Open  Sell  Limit  1  0.75195  Close        122122  619488182  91648    1          0.00    122122.44705  Day

Positions  F.US.CA6H23  2023-02-02 08:10:01.943967  Updated Service Position Quantity to 0  Unspecified                      91648    1          0.00      

Orders  F.US.CA6H23  2023-02-02 08:10:01.943982  CQG order update. Status: FILL  Filled  Sell  Limit  1  0.75195  Close  0.75195    1  122122  619488182  91648    1  54735260429        0.00    122122.44705  Day

Positions  F.US.CA6H23  2023-02-02 08:10:01.943983  Updated Internal Position Quantity to 0. Previous: 1  Unspecified      1                91648              0.00      

Fills  F.US.CA6H23  2023-02-02 08:10:01.943984  CQG order update. Status: FILL  Filled  Sell  Limit  1  0.75195  Close  0.75195    1  122122  619488182  91648      54735260429  0.75200  0.75195    0.00    122122.44705  Day

Positions  F.US.CA6H23  2023-02-02 08:10:09.020177  Removing Position with quantity of 0  Unspecified                      91648              0.00      


Orders    2023-02-02 14:32:26.847851  Trade Simulation Mode has been enabled. Toggled by user  Unspecified                      None              0.00  



Trade Service Log:

SC Data - All Services | MaxConnectionsForSameDevice = 3, NumCurrentConnectionsForSameDevice = 1 | 2023-02-02 06:20:35.147

Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:10:03.255
[2023-02-06 16:06:18]
John - SC Support - Posts: 36350
When you switched to Simulation Mode did you set the Spreadsheet Study for Trading Input for Send Orders to Trade Service to No? If you left it as Yes then the order would not be sent for the Simulation mode.

If the above is the case, you should have a line in your Trade Service Log regarding this.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-02-06 19:19:01]
PeaceFrog - Posts: 105
Hi John,

Glad to have you looking at this.

I reran it twice;
once in Simulation Mode with Spreadsheet Study for Trading Input for Send Orders to Trade Service set to No and
once in Simulation Mode with Spreadsheet Study for Trading Input for Send Orders to Trade Service set to Yes and in neither case were the orders sent.


Here are the Trade Service Logs for in Simulation Mode with Spreadsheet Study for Trading Input for Send Orders to Trade Service set to No:

Cleared global profit/loss management data for Sim1. | 2023-02-06 11:07:18.704
TradeActivity files query time: 0.013069 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:07:18.717
Cleared trade data | Symbol: [Sim]F.US.CA6H23 | TradeAccount: Sim1 | 2023-02-06 11:07:18.728
Flagging to reload Trades list in charts | Symbol: [Sim]F.US.CA6H23 | TradeAccount: Sim1 | 2023-02-06 11:07:18.743
TradeActivity files query time: 0.070833 seconds. Entries: 0. Current queries: 12 | 2023-02-06 11:07:18.814
TradeActivity files query time: 0.000039 seconds. Entries: 0. Current queries: 12 | 2023-02-06 11:07:18.814
TradeActivity files query time: 0.000021 seconds. Entries: 0. Current queries: 12 | 2023-02-06 11:07:18.814
TradeActivity files query time: 0.003744 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.818
TradeActivity files query time: 0.000365 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.818
TradeActivity files query time: 0.000298 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000279 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000029 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000024 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000259 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000027 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.819
TradeActivity files query time: 0.000253 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:07:18.820
TradeActivity files query time: 0.000064 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:07:18.972



Here are the Trade Service Logs for in Simulation Mode with Spreadsheet Study for Trading Input for Send Orders to Trade Service set to Yes:

TradeActivity files query time: 0.000063 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:08:37.745
Cleared global profit/loss management data for Sim1. | 2023-02-06 11:09:07.643
TradeActivity files query time: 0.013340 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:09:07.657
Cleared trade data | Symbol: [Sim]F.US.CA6H23 | TradeAccount: Sim1 | 2023-02-06 11:09:07.678
Flagging to reload Trades list in charts | Symbol: [Sim]F.US.CA6H23 | TradeAccount: Sim1 | 2023-02-06 11:09:07.693
TradeActivity files query time: 0.069919 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000351 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000030 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000256 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000027 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000021 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.763
TradeActivity files query time: 0.000245 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.764
TradeActivity files query time: 0.000241 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.764
TradeActivity files query time: 0.000257 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.764
TradeActivity files query time: 0.000238 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.764
TradeActivity files query time: 0.000025 seconds. Entries: 0. Current queries: 11 | 2023-02-06 11:09:07.764
TradeActivity files query time: 0.000071 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:09:07.855
TradeActivity files query time: 0.000069 seconds. Entries: 0. Current queries: 1 | 2023-02-06 11:09:07.923


I agree with you that there should be a line or two in the Trade Service Log at the time the transactions happened, but there isn't anything. It skips right over it. This is what there is:

SC Data - All Services | MaxConnectionsForSameDevice = 3, NumCurrentConnectionsForSameDevice = 1 | 2023-02-02 06:20:35.147
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:10:03.255
Buy Exit (Sell) | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: L3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:10:03.255
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:11:37.869
Buy Exit (Sell) | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: L3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:11:37.869
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:11:46.920
Buy Exit (Sell) | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: L3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:11:46.920
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:14:27.838
Buy Exit (Sell) | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: L3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:14:27.838
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:14:57.440
Buy Exit (Sell) | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: L3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:14:57.440


The only information I have about the transactions comes from the Trade Activity Log and on my statement from that day.
[2023-02-06 23:22:45]
John - SC Support - Posts: 36350
We are a bit confused on the timing of all the pieces, but it seems like the following gives the answer as to why you are not seeing the order go through in Simulation Mode:
Buy Entry | Signal ignored because 'Signal Only Once Per Bar' is enabled and a signal was already given from formula column for bar. | Cell: K3 | Bar start date-time: 2023-02-02 08:10:00 | 2023-02-02 08:10:03.255

This is stating that you have the option for Signal Only Once Per Bar enabled, and it sounds like you may have a situation where the state of the cell was "True" when the bar started, then changed to "False" and then "True" again, but this last "True" did not create an entry due to the fact that it thought it had already done so.

We do not know for sure that the above is the situation, it just looks like there is something along those lines occurring. You would really need to take a look at the state of your conditions as you go through. And keep in mind that for the order to be sent, the condition must go from False to True
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account