Login Page - Create Account

Support Board


Date/Time: Sat, 28 Dec 2024 07:17:51 +0000



Spreadsheet places double trades violating spreadsheet rules

View Count: 1151

[2016-01-06 15:22:04]
PeakGrowth - Posts: 3
Hi,

I have a spreadsheet which placed a trade twice within the one five minute bar.

I have these settings in particular:
- Signal only on bar close - Yes
- Allow Multiple entries in the same direction - no
- maximum position allowed - 300

However, as can be seen from the attached screenshots, the spreadsheet placed 2 300 unit trades. 300 sell at 8:55:03 and 300 sell at 8:55:16 for a total of 600 units. This broke all 3 rules mentioned above, and I believe it might be a glitch of some sort. I have never had this error before. This could be quite a bad glitch, as it doubled my exposure.

The subsequent buy was a manual trade entered to reduce my exposure back to down to 300.

I am using IB, please advise if you need additional screenshots or logs.

Cheers
imageTrade Log.PNG / V - Attached On 2016-01-06 15:12:49 UTC - Size: 11.8 KB - 322 views
imagespreadsheet settings.PNG / V - Attached On 2016-01-06 15:21:35 UTC - Size: 52.7 KB - 340 views
[2016-01-06 19:33:18]
Sierra Chart Engineering - Posts: 104368
Maximum Position Allowed cannot always limit the Position quantity as explained here:
https://www.sierrachart.com/index.php?page=doc/doc_AutoTradeManagment.php#MaximumPositionAllowed

What do you think the problem was? You developed the trading system and it is your responsibility to do your best to isolate the source the problem to the extent that you can and then we will look at the rest of it.

From our perspective, we have little idea about this. We might have some clue by looking at the Trade Activity Log. Provide us the relevant order lines. Here are instructions:
https://www.sierrachart.com/index.php?page=doc/doc_TradeActivityLog.php#TradeActivityLogToSupport

You might also want to set this to No:
Allow Entry with Working Orders

Another thing that helps us is to know what chart bar the order signals were generated from and that information is not currently logged in the Trade Activity Log but we are working on adding that now.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-01-06 19:34:29
[2016-01-06 19:34:53]
Sierra Chart Engineering - Posts: 104368
Some corrections were made to the prior posting.

Also, there is some explanation for what is happened, and we may not know the reason. In general automated trading is very complicated and it cannot always work perfectly as you might expect. And as we said, it is your trading system and we do not provide automated trading system debugging. So we may not be able to answer this question unless we have some more clear information about it.


Ultimately what we would need from you, is a scenario which you could reproduce that demonstrates this condition and where the automated trading management is not working as expected.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-01-06 19:36:48
[2016-01-06 19:47:07]
Sierra Chart Engineering - Posts: 104368
You will also want to set this to No:
Cancel All Orders on Entries and Reversals

And this:
Allow Entry with Working Orders
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2016-01-06 20:01:44]
Sierra Chart Engineering - Posts: 104368
The only setting which should actually limit this based upon the other settings would be Signal Only Once Per Bar.

So what we are wondering is whether these orders originated from the same bar definitively. So I think we have narrowed it down to that.

The other settings are not going to place a limit contrary to what you think because of how you had these set:

Cancel All Orders on Entries and Reversals = Yes
Allow Entry with Working Orders = Yes

This brings up a question though as to whether we should still consider working market orders in the calculations even though they are attempted to be canceled. That would be the one thing we could change which would prevent this kind of problem regardless of the settings you are using.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-01-06 20:05:14
[2016-01-06 20:07:24]
PeakGrowth - Posts: 3
Hi,

I've never hard this problem before, either in real trading or tick based back testing. I am not sure how it can be replicated, to be honest and it might be a one off glitch. I don't think it is a programming error, here would be no reason for it to do that in the logic.

The signal was given at 8:50 and once the 8:50 5 minute bar was completed, the system then proceeded to place a market order as expected (except it placed two).

I'll fix the other conditions that you recommended and I'll keep monitoring to see if it reproduces.

Thanks
[2016-01-06 20:42:37]
PeakGrowth - Posts: 3
Hi,

Those two settings I left them as yes as I can have this system set up to place limit orders, which I most likely might be re-enabling again tomorrow.

I am not sure why canceling working orders would affect it though? The original market order was executed 13 seconds earlier, which made it extremely odd.

I might add that I changed it to "signal only once per bar" only after this glitch happened, as I thought that this switch only affected opposing signals (e.g. a buy and sell signal both triggering). I switched it on straight away before I re-enabled auto trading in case the system started to sell 300 every 10 seconds which would have being an issue.

I only have the one system running for this one instrument, there are no other spreadsheets which are functioning except for a daily bars one which is on a different instrument and different chart book, so I don't think there was any sort of clash in terms of multiple signals.
Date Time Of Last Edit: 2016-01-06 20:45:07
[2016-01-07 04:29:07]
Sierra Chart Engineering - Posts: 104368
We have enough information now. "signal only once per bar" will have prevented this.

None of this is an issue:

I only have the one system running for this one instrument, there are no other spreadsheets which are functioning except for a daily bars one which is on a different instrument and different chart book, so I don't think there was any sort of clash in terms of multiple signals.

We could spend further time examining this, but we are fairly confident now what generally has gone wrong here.

We need to consider working market orders in calculations involving working orders even with the auto trade variables that cancel orders being set to TRUE. We should have the changes in place by next week.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2016-01-07 04:29:39

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

Login

Login Page - Create Account