Support Board
Date/Time: Sat, 20 Apr 2024 07:52:31 +0000
Post From: Is Version 1898 StartDateTimeForLoadingOrderFills Changing my Persistent Variable?
[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. |