Login Page - Create Account

Support Board


Date/Time: Thu, 18 Apr 2024 22:30:57 +0000



Is Version 1898 StartDateTimeForLoadingOrderFills Changing my Persistent Variable?

View Count: 811

[2019-04-15 15:07:02]
bradh - Posts: 853
I have been trying to identify why my code is changing a variable, and I am pretty sure something else is causing it. The persistent variable is PartialExit, and it goes to 1 when one or more contracts are taken off. It should only return to 0 when there is a reversal entry and the OpenQty changes from 0 to non-zero.

Version 1882 Relevant Message Log (works correctly):
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | ==========Begin Loop======================== | 2019-04-15 10:27:52
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | PartialExit: 1 | 2019-04-15 10:27:52
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | OpenQty: 0 | 2019-04-15 10:27:52
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | ==========Begin Loop======================== | 2019-04-15 10:27:52
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | PartialExit: 0 | 2019-04-15 10:27:52
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | OpenQty: -1 | 2019-04-15 10:27:52

Version 1898 Relevant Message Log entries (works incorrectly):
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | ==========Begin Loop======================== | 2019-04-15 10:43:03
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | PartialExit: 1 | 2019-04-15 10:43:03
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | OpenQty: 0 | 2019-04-15 10:43:03
Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | StartDateTimeForLoadingOrderFills: 00:00:00 | 2019-04-15 10:43:03
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | ==========Begin Loop======================== | 2019-04-15 10:43:03
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | PartialExit: 0 | 2019-04-15 10:43:03
Chart: Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | Study: SETT System | OpenQty: 0 | 2019-04-15 10:43:03

As you can see the OpenQty variable has not changed, yet the PartialExit has. StartDateTimeForLoadingOrderFills is what seems to be having an impact somehow.

Also, I noticed the following in the 1898 Trade Service Log:
Sending 20 order fills to server. First fill date-time UTC: 2019-04-12 21:29:47. Last fill date-time UTC: 2019-04-13 14:23:14 | 2019-04-15 11:01:32
The sending of order fills is successful. | HTTP status: Request completed with the HTTP response status code 200. | 2019-04-15 11:01:33

I don't know if it is related, but I thought I would include it, as it is new to me. I have Send Order Fills to SC Server unchecked.
[2019-04-15 17:37:42]
Sierra Chart Engineering - Posts: 104368
Replay 10.00X: NQM9 Flex Renko Inv 10-1-20 #1 | StartDateTimeForLoadingOrderFills: 00:00:00 | 2019-04-15 10:43:03

This is definitely unrelated. That is 100% definitively unrelated. Do not even consider it. We do not provide programming help. You will have to figure out what the issue with your code is.

If you see order fills being sent to the server, then make sure that this option is disabled:
Global Trade Settings Windows: Send Order Fills to SC Web Server (Global Settings >> General Trade Settings >> General)

If it is disabled this is not going to happen. But there may have been previous fills which were queued and not previously sent when you did have it enabled. An issue related to this has been resolved. Exit from Sierra Chart and delete this file:
TradeActivityLogs/OrderFillsToSend.data
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
[2019-04-15 21:37:46]
bradh - Posts: 853
Thanks.

I deleted the OrderFillsToSend.data file and the DLL now works when compiled with version 1898. The version compiled with 1882 worked with 1898, now it compiles and runs fine with 1898.
[2019-04-16 20:27:28]
Sierra Chart Engineering - Posts: 104368
But that file is unrelated to any problems with a custom study. It will just solve a problem related to these messages:

The sending of order fills is successful. | HTTP status: Request completed with the HTTP response status code 200. | 2019-04-15 11:01:33
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: 2019-04-16 20:28:03
[2019-04-17 15:57:57]
bradh - Posts: 853
I agree that they should be unrelated, but that doesn't explain the symptoms I had. When compiled and run with 1882 or 1898, there was no problem, and no message about the sending of order fills. When compiled and run with 1898, the persistent variable was somehow reset at the same point in time the message about the StartDateTimeForLoadingOrderFills appeared in the Message Log.

So while it is working for me now, it appears there was some interaction with the OrderFillsToSend.data file and the execution of my custom study. Even though I did have the setting for Send Order Fills to SC webserver unchecked, it was still trying to upload the file and getting status code 200.
[2019-04-17 18:57:43]
Sierra Chart Engineering - Posts: 104368
There is no interaction. It just does not exist. That is with certainty.
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

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

Login

Login Page - Create Account