Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 16:39:44 +0000



Spreadsheet autotrade replay is entering when condition is zero

View Count: 192

[2024-08-05 04:29:22]
User745789 - Posts: 313
Please see attached images from a simple spreadsheet system.

One image shows the chart, with a short position entry on bar timestamp 03:04:00.

The other image shows the corresponding spreadsheet, and the row for the same timestamp. Col M (Sell Entry) has a value of zero.


Why did the replay enter a trade when it was not triggered?
Date Time Of Last Edit: 2024-08-05 08:51:30
image2024-08-05 12_24_34-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-05 04:28:51 UTC - Size: 32.62 KB - 44 views
image2024-08-05 12_22_55-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-05 04:28:57 UTC - Size: 7.13 KB - 39 views
[2024-08-05 08:51:21]
User745789 - Posts: 313
In real time auto trading, I can also find trades that enter when Col M entry condition is = 0. See image with short entries when Col M is not true (red down arrows).

I may have worked out what is happening, though am not sure. See image with the long entry

1. An entry setup is triggered with cell M3 = true. Pink circle
2. A stop entry price is correctly calculated and printed in cell J24. This is high of previous bar + 1tick. Previous bar is marked with orange X, initial stop entry level is brown line.
3. At the same time, an order line is printed on the chart at the level from step 2 (brown line)
4. while all this is happening, the market is moving down and the stop entry price is being recalculated correctly in cell J24.... but is being ignored, the chart order entry line is not moving with the value in J24. The correct stop entry should have been the yellow circled bar, at the yellow line. But it was ignored
5. the order line for entry on the chart from step 3 is still active on the chart, and when it is hit, it is filled, even though it no longer the current J24 stop entry price. See fill on chart at brown line.
Date Time Of Last Edit: 2024-08-05 09:35:16
image2024-08-05 16_49_49-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-05 08:51:18 UTC - Size: 4.7 KB - 42 views
image2024-08-05 17_35_03-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-05 09:35:13 UTC - Size: 5.34 KB - 42 views
[2024-08-05 14:01:31]
Sawtooth - Posts: 4118
The Spreadsheet System for Trading study cannot move an existing pending Stop Entry.
You must cancel it, and replace it at the new price.

J71/J73 need to be set to "S".

If you edit the twconfig, you must save it and re-choose it in the dropdown.
[2024-08-05 23:47:08]
User745789 - Posts: 313
Thank you for your reply.

This is a deal breaker problem/bug that I have to solve with priority.

"The Spreadsheet System for Trading study cannot move an existing pending Stop Entry.
You must cancel it, and replace it at the new price."

So it isn't autotrading?

As best I can tell, the spreadsheet with stop entry simply doesn't work as intended. It is buggy. I get entries no where near when "Sell Entry" is true. See image.

I have J71 and J73 set to S and the stop entry prices are being calculated correctly, but are not being executed correctly. There is a clear bug.

Another problem/bug: the spreadsheet enters sell stop entry orders at seemingly random places, below the market. Those orders are never executed, and block the placement of correct orders at a later time. This is per the message in the Trade Services Log.
Date Time Of Last Edit: 2024-08-06 00:27:20
image2024-08-06 07_42_53-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-05 23:47:03 UTC - Size: 3.44 KB - 39 views
[2024-08-06 00:42:44]
Sawtooth - Posts: 4118
So it isn't autotrading?
It is autotrading, within the limits of the spreadsheet study.
If you want to move an existing pending Stop Entry in an autotrader, you would need to use ACSIL.

stop entry prices are being calculated correctly, but are not being executed correctly.
To get a close-of-bar price in column J, you must reference row 4, not row 3: =C4+J21
The 'Signal Only On Bar Close' setting only applies to Formula Columns.

There is a clear bug.
Another problem/bug:
Probably not, since no one else has this issue.

So let's figure it out.
Do you have more than one chart in this chartbook, using the same symbol, with the same-named spreadsheet?
[2024-08-06 01:29:24]
User745789 - Posts: 313
So let's figure it out.

Thanks friend. I'll send you a USD50 Amazon gift voucher if you can help me resolve this oddity: get entries executing at the right price on the right bar. See another attached image1, I am watching it trade now, and it is entering trades no where near the bars in which Buy Entry K1 is true.

Do you have more than one chart in this chartbook, using the same symbol, with the same-named spreadsheet?

No. One chart only

To get a close-of-bar price in column J, you must reference row 4, not row 3: =C4+J21

I am doing se. Please see image J22, for cell J22 formula.

If you want to move an existing pending Stop Entry in an autotrader, you would need to use ACSIL.

This stumps me greatly. The stop-entry prices in J22 and J24 are being calculated perfectly. But they are not being executed. See image2. The working and now ver out of date buy stop order:

1. was never a valid entry in the first place
2. is now stopping the correct stop entry being worked (at H of the second last bar + 1 tick). Which is the correct price in cell J22. In image2, entry should have been at the yellow line, but there was no entry due to that other incorrect order sitting there.
Date Time Of Last Edit: 2024-08-06 01:30:58
imageimage1.png / V - Attached On 2024-08-06 01:29:12 UTC - Size: 2.44 KB - 32 views
imageImage2.png / V - Attached On 2024-08-06 01:29:15 UTC - Size: 5 KB - 35 views
imageJ22.png / V - Attached On 2024-08-06 01:29:19 UTC - Size: 4.52 KB - 32 views
[2024-08-06 01:32:45]
Sawtooth - Posts: 4118
One tick is J21
A value of 1 is one point.

The only symbol where the ticksize equals the point value is YM.
[2024-08-06 01:36:43]
User745789 - Posts: 313
The value in J21 is "1". Please see attached image.

Symbol is Eurex Euro Stoxx.

For correctness, I have edited my J22/24 formula according to image3.

Per my post #2, I suspect that one of the fundamental problems, is that SC doesnt move the entry stop as the market moves. It recalulates it correctly in J22/24, but those levels are ignored. The only entry stop that is worked is the first one that prints when entry setup becomes true. I have somewhat confirmed this by experimenting with the settings in image 4. Now I need an older entry order to be cancelled when a new order is generated in the same direction.
Date Time Of Last Edit: 2024-08-06 01:52:48
image2024-08-06 09_35_29-Sierra Chart 2654 TPB CQG WebAPI 2024-08.png / V - Attached On 2024-08-06 01:36:23 UTC - Size: 1.74 KB - 38 views
imageimage3.png / V - Attached On 2024-08-06 01:38:24 UTC - Size: 6.42 KB - 36 views
imageimage4.png / V - Attached On 2024-08-06 01:52:43 UTC - Size: 33.73 KB - 33 views
[2024-08-06 02:37:09]
Sawtooth - Posts: 4118
With 'Signal Only On Bar Close' set to No, your entry will be at first occurrence intrabar.
Is this your intention?

You would not have multiple entry signals in the same bar unless the signal cycled through FALSE. IOW, each new signal must follow a FALSE.
Is it your intention to have multiple signals in the same bar?

With 'Reset Condition On New Bar' set to No, there would not be a new signal at a new bar unless the signal cycled through FALSE.
Maybe 'Signal Only On Bar Close (K,M)' should be set to Yes.

Also, historical arrows only occur if the condition existed at close-of-bar. There are no historical arrows for intrabar signals.

You would use J29 to cancel a working order, so that you could place a new one at a different price.
However, canceling and replacing in the same bar is fraught with issues. Even doing it in the subsequent bar can be problematic.
IMO, intrabar signals can be problematic, whereas close-of-bar signals are straight-forward.
[2024-08-06 04:25:08]
User745789 - Posts: 313
Thank you for your ongoing support. Lets see if we can get you that gift voucher. If it helps and you have Eurex data, I can attach the chartbook?

With 'Signal Only On Bar Close' set to No, your entry will be at first occurrence intrabar.
Is this your intention?

I am set to No. Intra-bar Stop entry is desired. As a work-around for avoiding the problems that seem to come with stop entries, I am thinking about a logic that enters at bar close at market if bar close is > previous bar H+1. But I do not wish to go down that path yet.

Is it your intention to have multiple signals in the same bar?

No. I am experimenting with multiple signals in the same direction since the stop entry doesn't adjust on its own (which if I understand that correctly, it is an obvious flaw in the operation of an "auto" system. See image5 for example: the buy stop entry was triggered on the yellow bar. It should have been revised downwards on the orange bar - as per the spreadsheet calculations - And it should have entered on the pink bar at High of orange bar + 1 tick. It does not enter then. See image6 - it only enters when the previous stale stop buy level is hit from image5. And if I understand correctly, then this is a complete Sierra Chart spreadsheet autotrading deal breaker, and I am amazed that I am the first person to have encountered it. Which makes me think I am not understanding the situation correctly).

Also, historical arrows only occur if the condition existed at close-of-bar. There are no historical arrows for intrabar signals.

Understood. I will have to research this with playback. Because I am getting numerous orders no where near historical arrows. So maybe there was an arrow intrabar, that was later removed when the bar closed.

Nonetheless, I can watch my strategy trade and it simply does not place stop entry orders at the time and place that it should. The logic is simple, that is not in question. It is the execution of the logic that is causing me problems.

You would use J29 to cancel a working order, so that you could place a new one at a different price.

What causes the working order to be cancelled though? I need an existing working order cancelled when a new working order in the same direction is generated (and a better stop entry price, as time passes and new bars are printed)

Perhaps I will presently simplify things and enable only close-of-bar signals.
Date Time Of Last Edit: 2024-08-06 04:44:29
imageimage5.png / V - Attached On 2024-08-06 04:43:24 UTC - Size: 12.09 KB - 37 views
imageimage6.png / V - Attached On 2024-08-06 04:43:27 UTC - Size: 2.58 KB - 37 views
[2024-08-06 04:59:24]
Sawtooth - Posts: 4118
this is a complete Sierra Chart spreadsheet autotrading deal breaker, and I am amazed that I am the first person to have encountered it.
You are certainly not the first to notice this. I, for one, am telling you about it.
It's not a flaw, it's just a limitation of the Spreadsheet System for Trading study, so if it's a deal breaker, you'll need to move up to a custom ACSIL programmed autotrader.

So maybe there was an arrow intrabar, that was later removed when the bar closed.
This is why IMO intrabar signals are problematic.

What causes the working order to be cancelled though?
Answer: A formula in J29 that goes TRUE.
You will need to code that condition.

Going forward, it might be best if you direct message me.

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

Login

Login Page - Create Account