Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 22:26:31 +0000



Spreadsheet System for Trading sending Entry and Exit orders without proper Signal

View Count: 1177

[2023-03-13 20:54:49]
PeaceFrog - Posts: 105
This morning the Spreadsheet System I’m working with sent an Entry and Exit order when there was not a Signal in the System to do so. I know this because I replayed the chart in Simulation Mode and a Signal did not show up. Using the Spreadsheets “Details” button, I double checked the variables in the Signal formula at the exact time (per the Trade Activity Log) the Orders were sent and the variables did not result in a signal – I encounter “(not evaluated)” in the “Details”.


Below are the Trade Service Log and Trade Activity Log.
You can see that there are no Trade Service Log entries at the time the System sent the Entry and Exit Orders - 2023-03-13 04:08:11.097103

TRADE SERVICE LOG
TradeActivity files query time: 0.016137 seconds. Entries: 0. Current queries: 1 | 2023-03-13 03:50:11.156

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-03-13 04:00:00 | 2023-03-13 04:09:03.100


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  F.US.CA6M23  2023-03-13 04:08:11.097103  Auto-trade: F.US.CA6M23[M] 10 Min #2 | CA6 - H11-Z22 - 1030ADX-2 Cont | BuyEntry | Formula: Buy Entry at row 3 is TRUE. | Bar start date-time: 2023-03-13 04:00:00.000 | Last: 0.7269 | AO=0  Order Sent  Buy  Limit  1  0.72695  Open        137321    91648              0.00      Day

Orders  F.US.CA6M23  2023-03-13 04:08:11.203782  CQG order update. Status: IN_TRANSIT  Pending Open  Buy  Limit  1  0.72695  Open        137321  681075796  91648              0.00    137321.61824  Day

Orders  F.US.CA6M23  2023-03-13 04:08:11.204254  CQG order update. Status: ACK_PLACE  Open  Buy  Limit  1  0.72695  Open        137321  681075796  91648              0.00    137321.61824  Day

Positions  F.US.CA6M23  2023-03-13 04:08:11.215360  Updated Service Position Quantity to 1  Unspecified                      91648              0.00      

Orders  F.US.CA6M23  2023-03-13 04:08:11.215382  CQG order update. Status: FILL  Filled  Buy  Limit  1  0.72695  Open  0.72695    1  137321  681075796  91648      55260250637        0.00    137321.61824  Day

Positions  F.US.CA6M23  2023-03-13 04:08:11.215383  Updated Internal Position Quantity to 1. Previous: 0  Unspecified      1                91648    1          0.00      

Fills  F.US.CA6M23  2023-03-13 04:08:11.215384  CQG order update. Status: FILL  Filled  Buy  Limit  1  0.72695  Open  0.72695    1  137321  681075796  91648    1  55260250637        0.00    137321.61824  Day

Orders  F.US.CA6M23  2023-03-13 04:08:11.599712  Auto-trade: F.US.CA6M23[M] 10 Min #2 | CA6 - H11-Z22 - 1030ADX-2 Cont | BuyExit | Formula: Buy Exit (Sell) at row 3 is TRUE. | Bar start date-time: 2023-03-13 04:00:00.000 | Last: 0.72695 | AO=0  Order Sent  Sell  Limit  1  0.72730  Close        137322    91648    1          0.00      Day

Orders  F.US.CA6M23  2023-03-13 04:08:11.712763  CQG order update. Status: IN_TRANSIT  Pending Open  Sell  Limit  1  0.72730  Close        137322  681050974  91648    1          0.00    137322.79979  Day

Orders  F.US.CA6M23  2023-03-13 04:08:11.713131  CQG order update. Status: ACK_PLACE  Open  Sell  Limit  1  0.72730  Close        137322  681050974  91648    1          0.00    137322.79979  Day



Later in the day, the System did return a Signal, which does show up in Chart Replay, and the Trade Service Log had the following entries:
Auto-trade: F.US.CA6M23[M] 15 Min #2 | CA6 - H11-Z22 - 1545ADX-2 Cont | BuyEntry | Bar start date-time: 2023-03-13 05:00:00.000 | BuyEntry signal is ignored because maximum Long Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 1. Resulting Position without working orders: 2. Resulting Position with all working orders except exits: 2. Resulting Position with Market working orders: 2 | 2023-03-13 05:00:35.284

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-03-13 05:00:00 | 2023-03-13 05:02:33.825




Something very similar happened a few weeks ago and has caused a serious loss for me. I really need to get this resolved so I can use the Spreadsheet System for Trading with some degree of confidence because right now the System is sending Orders when it shouldn’t be according to the formulas I have in the System.


Please help. I really appreciate it.
[2023-03-13 22:07:46]
John - SC Support - Posts: 36350
First of all, if a proper order is generated, then there will not be any information in the "Trade Service Log". The Trade Service Log is to give information when there is an issue, such as the examples from your post, which are showing that it could not place an order due to an already existing signal and it was set to only signal once per bar.

Second, when you run the replay, what kind of replay are you doing? And why would the cell show "Not Evaluated"? This sounds like you may have been running the "Accurate Trading System Back Test Mode". Keep in mind that this will not necessarily match exactly what occurs in real-time, so what you are seeing is definitely possible.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-03-13 23:28:17]
PeaceFrog - Posts: 105
Hi John. Thank you for responding so quickly.

First, thank you for clarifying that the “Trade Service Log” only gives information when there is an issue – Got it. Thanks.

Second, the Replay I’m running is “Calculate At Every Tick/Trade (High CPU Usage)”. I figure this is the most accurate Replay to use to replicate Real-Time, is it not?

The cell itself isn’t showing “(not evaluated)”. I see “(not evaluated)” when I have the Replay paused and when I “Jump” “By Number of Trades” Unit “1” from “2023-03-13 04:08:10” (this takes 4 click) to "2023-03-13 04:08:11", then I go to cell O3 where I have an “IF Statement” formula and click on the “Details” button which brings up a window with the formula tree in it, and I see “(not evaluated)” at one of the formula variables/parameters, which means the conditions to signal Yes are not met. (I have a formula in K3, that says, if O3=1,1……. And I have this because I have formulas in P3 and Q3).



As I mentioned, later in day the Trade Service Log shows another “Auto-Trade” entry but there are 2 more “Auto-trade” entries:
The one I posted about previously:
Auto-trade: F.US.CA6M23[M] 15 Min #2 | CA6 - H11-Z22 - 1545ADX-2 Cont | BuyEntry | Bar start date-time: 2023-03-13 05:00:00.000 | BuyEntry signal is ignored because maximum Long Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 1. Resulting Position without working orders: 2. Resulting Position with all working orders except exits: 2. Resulting Position with Market working orders: 2 | 2023-03-13 05:00:35.284

And the other two:
Auto-trade: F.US.CA6M23[M] 15 Min #2 | CA6 - H11-Z22 - 1545ADX-2 Cont | BuyEntry | Bar start date-time: 2023-03-13 05:15:00.000 | BuyEntry signal is ignored because maximum Long Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 1. Resulting Position without working orders: 2. Resulting Position with all working orders except exits: 2. Resulting Position with Market working orders: 2 | 2023-03-13 05:15:00.365, and

Auto-trade: F.US.CA6M23[M] 15 Min #2 | CA6 - H11-Z22 - 1545ADX-2 Cont | BuyEntry | Bar start date-time: 2023-03-13 05:30:00.000 | BuyEntry signal is ignored because maximum Long Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 1. Resulting Position without working orders: 2. Resulting Position with all working orders except exits: 2. Resulting Position with Market working orders: 2 | 2023-03-13 05:30:00.396


When I replay the chart, I can only get the “Auto-Entry at 2023-03-13 05:00:35.284” to return a Signal, which is good because it meets the formula criteria. Again using Replay “Calculate At Every Tick/Trade (High CPU Usage). I’ve tried a variety of different speeds to get the other 2 to signal and they don’t and, according to the formulas in my spreadsheet, they shouldn’t. So, like the case at “04:08:11.097103”, in Replay “05:15:00.365” and “05:30:00.396” don’t signal and shouldn’t, yet when Live the System sent or attempts to send orders.
[2023-03-14 01:17:45]
PeaceFrog - Posts: 105
Hi John,

It just happened again. I have 2 Instances of Sierra Chart running. Instance 1 is Live and Instance 2 is Simulation Mode with the same “.Cht” and “.scss” files and same formulas. The difference is that Instance 2 is in Simulation Mode and “Send Orders To Trade Service” is set to “No”, whereas Instance 1 is set to “Yes”. I copied the “.Cht” and “.scss” files from the Instance 1 Data Folder and pasted them in the Instance 2 Data Folder.

In Instance 1, the System sent an order when there wasn’t a signal and in Instance 2, there wasn't a signal and no order was sent.
[2023-03-16 23:54:54]
PeaceFrog - Posts: 105
Hi. It's been a couple of days since I've heard back about this. Kindly advise. Thank you.
[2023-03-21 16:52:34]
Sierra_Chart Engineering - Posts: 17210
There will still be differences:
I figure this is the most accurate Replay to use to replicate Real-Time, is it not?

Refer to:
Auto Trade System Back Testing: Differences Between Back Testing and Real-Time Auto Trade System Evaluation

Regarding this:
When I replay the chart, I can only get the “Auto-Entry at 2023-03-13 05:00:35.284” to return a Signal, which is good because it meets the formula criteria. Again using Replay “Calculate At Every Tick/Trade (High CPU Usage). I’ve tried a variety of different speeds to get the other 2 to signal and they don’t and, according to the formulas in my spreadsheet, they shouldn’t. So, like the case at “04:08:11.097103”, in Replay “05:15:00.365” and “05:30:00.396” don’t signal and shouldn’t, yet when Live the System sent or attempts to send orders.
In Instance 1, the System sent an order when there wasn’t a signal


Refer to:
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
Date Time Of Last Edit: 2023-03-21 16:54:46
[2023-03-24 18:10:14]
PeaceFrog - Posts: 105
Hello. Thank you for your reply.

After thoroughly reviewing both webpages:

Auto Trade System Back Testing: Differences Between Back Testing and Real-Time Auto Trade System Evaluation, and
Automated Trading Management: Troubleshooting Automated Trading System Behavior

I cannot determine why the System is doing this. That I am using copies of the same “.Cht” and “.scss” files and the same formulas yet am receiving difference results between Live and Replay, leads me to believe this is not an issue with code, design, formulas, logic or debugging.


The issue happened again yesterday:
I have two Instances of Sierra Chart running, Instance 1 in Live Mode and Instance 2 in Simulation Mode. Both use the same “.Cht” and “.scss” file and both have the same formulas in the spreadsheet. The Chart Update Interval for both is set to “500”.

The issue is that in Real Time both the Live and Simulated spreadsheets entered a position at 2023-03-23 12:01:05:451180 according to the Trade Activity Log and at 2023-03-23 12:01:06 and according to the Alert Log. When I Replay Instance 2 in Simulation Mode (using Replay, “Calculate At Every Tick/ Trade (High CPU usage)”, Speed “1”) from 2023-03-23 11:59:59 to 2023-03-23 12:01:10, a position is not entered, and a position should not have been entered according to the formulas in the spreadsheet.


I would like to have Telephone and Interactive Remote Assistance Support to resolve the issue.

Thank you kindly.
[2023-03-25 07:24:56]
Sierra_Chart Engineering - Posts: 17210
This is definitively something we do not provide this kind of support for. Once again refer to:
Automated Trading Management: Troubleshooting Automated Trading System Behavior

Specifically:
First understand that Sierra Chart support does *not* provide automated trading system help, development, debugging services, or debugging of complex study configurations, even for a cost. This is not part of our offerings, whether for free or for a payment, and it is not possible for us to do this for various reasons as explained.

All of this is immensely far outside the scope of our support especially with the low prices of Sierra Chart. Therefore, in almost all cases we cannot help other than refer you to the relevant documentation. And hypothetically even if we did get involved in this, you would be charged at a rate of 80-150 USD per hour and we would need to have an interest in getting involved in this which we definitely do not unless there is a technical problem which needs to be resolved.

Once again, we do not have the time or the interest to be involved in this. Our main interest is to provide software which meets the general requirements of our users, have it be stable, capable and well-documented. So from this perspective, any question you have for us should be made with this in mind or not made it all.

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
Date Time Of Last Edit: 2023-03-25 07:25:12
[2023-03-25 12:57:38]
Sawtooth - Posts: 4120
Why you are concurrently running live and sim on the same symbol with the same algo?

Do you have any spurious entries when running either separately?

Note: Concurrently using the same-named spreadsheet file in the same instance can cause unexpected behavior.

Suggestion: Rename one of the spreadsheet files. I use this method:
https://www.sawtoothtrade.com/tip-3.html
[2023-03-25 18:20:39]
PeaceFrog - Posts: 105
Hi Sierra_Chart Engineering,

I’m bringing this issue to your attention because I suspect there is a technical problem:
“we would need to have an interest in getting involved in this which we definitely do not unless there is a technical problem which needs to be resolved.”


Given that all other variables are equivalent;
that the System does send an order when Live and,
that the System does not send an order when in Replay,
leads me to believe there is a technical problem.

What else could it be? The only thing that’s changed is the System from “Live” to “Replay” and each produce a different result.
[2023-03-25 18:22:52]
PeaceFrog - Posts: 105
Hi Tom,

I’m running Real-Time Live in Instance 1 and Real-Time Sim in Instance 2, using the same symbol and algo (I copied the “.Cht” and “.scss” files from Sierra Charts->Data and pasted them into SierraChartInstance_2->Data and renamed them to differentiate) to figure out why in the Real-Time Instances 1 and 2 Spreadsheet System For Trading is sending (and filling) orders yet when I Replay Instance 2 Sim over the time period when the order was sent, no orders are sent, and according to the algo, no order should have been sent.

It’s frustrating because when I Replay a time period when the Live System has sent an order, and I pause the Replay on the second before the order was sent and then use the “Replay” “Jump” “By Number of Trades” “Unit: 1” feature throughout the second when the order was sent, no order gets sent, and according to the variables in the algo at each “Jump”, no order should have been sent. So basically, the Live System is sending orders and when I Replay the time period, the System is not sending an order, and according to the algo, no order should be sent. So really, the Live System is sending orders when it shouldn’t be, according to the algo during Replay, and I’m trying to figure out why.
[2023-03-25 21:45:18]
Sawtooth - Posts: 4120
Does the Live system have 'Send Orders To Trade Service' set to Yes, and 'Trade Simulation Mode On' is unchecked??

Does the Sim system have 'Send Orders To Trade Service' set to No, and 'Trade Simulation Mode On' is checked??

When you Replay Chart, is 'Send Orders To Trade Service' set to No, and 'Trade Simulation Mode On' is checked?

Are the signals intrabar or at close of bar?

Does the system use multiple charts of different timeframes?
[2023-03-26 02:28:52]
PeaceFrog - Posts: 105
Hi Tom,

Thank you so much for your help. I’m incredibly frustrated by this and am very concerned. I've answered your questions below:


Does the Live system have 'Send Orders To Trade Service' set to Yes, and 'Trade Simulation Mode On' is unchecked??
Yes

Does the Sim system have 'Send Orders To Trade Service' set to No, and 'Trade Simulation Mode On' is checked??
Yes

When you Replay Chart, is 'Send Orders To Trade Service' set to No, and 'Trade Simulation Mode On' is checked?
Yes. The chart I use to Replay is the same chart that's in Sim. Instance 2.

Are the signals intrabar or at close of bar?
Intrabar.
Signal Only On Bar Close (Columns L, N-Z) (ln:17) No
Signal Only On Bar Close (Columns K, M) (ln:18) No
Strict Signal Only On Bar Close Evaluation (ln: 50) No
(I think this answers this question)

Does the system use multiple charts of different timeframes?
Yes. The Chartbook has 2 charts; a 45 minute chart and a 15 minute chart. I use “Analysis”-> “Studies”-> “Study/ Price Overlay” to “import” the 45 minute chart data into the 15 minute Chart. The 15 minute chart also has the “Analysis”-> “Studies”-> “Spreadsheet System for Trading”.

Again, Tom, thank you so much for helping. I really appreciate it.
[2023-03-26 12:26:56]
Sawtooth - Posts: 4120
When using overlaid studies from another timeframe for autotrading signals, using the Study/Price Overlay study, there will be occasions when the signal will disappear, or will appear late. This anomaly can be mitigated by the 'Data Copy Mode' and Bar Time Matching Method' settings, but this anomaly cannot be totally eliminated.

Using intrabar signals only exacerbates the anomaly.

When using intrabar signals, a signal can flash and go unnoticed, and leave no marker because historical markers only show close of bar events.

IMO, using intrabar signals, that are based on overlaid studies from another timeframe, will have a high probability of being problematic.

When you do a Replay, have you selected 'All Charts In Chartbook'?
Date Time Of Last Edit: 2023-03-26 12:59:09
[2023-03-26 17:38:21]
PeaceFrog - Posts: 105
Hi Tom,

Thank you for the information. This sounds exactly like a technical problem.


Where can I find “Data Copy Mode” and “Bar Matching Method”? I don't find anything when I search.

Do Chartbooks with more than one chart timeframe and have a chart that pulls data from one timeframe into it using the Study/Price Overlay study and use “At Close of Bar” suffer from the same anomaly?

This past week I saw an instance where a signal was “on” during the current time period but then about an hour later or so, the signal disappeared.

When I do Replay’s I have that setting set at “Chart With Same Link Number”.


Thank you again for your help. This is very concerning.
[2023-03-26 18:42:02]
Sawtooth - Posts: 4120
This sounds exactly like a technical problem.
It's not a bug, just an unresolvable infrequent anomaly that you should be aware of.

Where can I find “Data Copy Mode” and “Bar Matching Method”? I don't find anything when I search.
They are two settings in the Study/Price Overlay study.
Study/Price Overlay Study

Do Chartbooks with more than one chart timeframe and have a chart that pulls data from one timeframe into it using the Study/Price Overlay study and use “At Close of Bar” suffer from the same anomaly?
The Study/Price Overlay anomaly occurs, regardless of intrabar vs close of bar. But it is usually more of a problem with intrabar signals.

This past week I saw an instance where a signal was “on” during the current time period but then about an hour later or so, the signal disappeared.
This is an example of the anomaly I'm referring to.

When I do Replay’s I have that setting set at “Chart With Same Link Number”.
Try this when doing a Replay:
- Focus the 15 min chart, and scroll back so that the bar of the spurious signal is at the chart's right edge.
- In the Replay panel, check 'Start Paused'.
- Use 'All Charts in Chartbook'
- Use 'Standard Replay', Speed 1x
- Don't use the Jump feature
- Click 'Play', then Clear Trade Data.
- Click 'Play' again, and let it play for the entire 15 min bar, to see if you get a signal.
[2023-03-29 00:05:02]
PeaceFrog - Posts: 105
Hi Tom,

Thanks for this information. I’ve spent the last couple of day working with it and I’m pretty sure the issue is that I had the Replay setting as “Charts with Same Link Number” (and didn’t have the charts linked), which caused the Instance 2 Sim Replay spreadsheet to have few values (values stemming from “Study/Price Overlay”) that didn’t match the Instance 1 live values at the time in question.

I did some trials with the different combinations of the “Study/Price Overlay” settings in “Data Copy Mode”, (“Use Earliest Value from Corresponding Timeframe in Source Chart” and “Use Latest Value from Corresponding Timeframe in Source Chart”) and from “Bar Time Matching Method” (“Containing Match” or “Nearest Match”) and they don’t seem to affect the values when “All Charts in Chartbook” is selected. Currently I have those “Price/Study Overlay” settings set at “Use Earliest” and “Containing Match”. Is this what you’d recommend?

In my Replay box, I don’t see an option to check “Start Paused”, which would be handy. Only if I choose “Clear Trade Data from Start Date-Time for Symbol and Account” does the chart replay start paused.

For the “Study/Price Overlay” anomaly, how often does it occur (roughly)? 1% of the time? 0.1%?

From the information on the SC Forum, I can’t determine which Replay Mode I should be using. Is “Accurate Trading System Back Test Mode” better than “Calculate At Every Tick/ Trade (High CPU Usage)”?


Now that I’ve changed to “All Charts in Chartbook” for Replay, when I press “Play” then choose my option for clearing data, a box pops up asking me to “Enter Processing Step in Seconds”. I’ve read what I could find online and in SC Support Forum but I don’t understand what it does. From my trials with it, it seems that a lower number is more accurate (more like real time tick by tick data), yet when I put in “0.01” the replay is just too slow. Is there some rule of thumb for what number to use here? Is there some correlation between what it should be and the lowest timeframe chart? For example, if Chart 1 is 45 minutes and Chart 2 is 15 minutes and Chart 2 has “Study/Price Overlay” studies importing data from Chart 1, and Chart 2 has the Spreadsheet System for Trading, what number do you recommend for "Processing Step in Seconds" to get an as Real-Time, tick for tick, accurate, replay as possible while being able to Replay 1 year in about an hour or two?



Thank you again for your help. I can’t tell you how much I appreciate it.
[2023-03-29 00:57:56]
Sawtooth - Posts: 4120
I don’t see an option to check “Start Paused”
This is a relatively new feature. Be sure you are on the latest version.
Replay Sync
IMO, this is an essential feature, especially when replaying multiple charts.

For the “Study/Price Overlay” anomaly, how often does it occur (roughly)? 1% of the time? 0.1%?
It is usually infrequent, but it depends on timing and sync factors of the studies between charts.

I can’t determine which Replay Mode I should be using
Accurate Trading System Back Test Mode is the most accurate.
I don't see a need to use Calculate At Every Tick/ Trade (High CPU Usage), unless you need to troubleshoot something.

what number do you recommend for "Processing Step in Seconds"
This show ups with all replay modes except Standard Replay, and only if you are replaying multiple charts.
Use 1 if you want to see every move. This slows it down however, but I don't know if it improves accuracy.
If you don't need to see every move, any value is ok.

Try a large Processing Step in Seconds, and a very fast speed.
Then try a small Processing Step in Seconds, and a very slow speed.
And compare results.
The former should be able to test a years worth of tick data in an hour or two.

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

Login

Login Page - Create Account