SUMMARY OF THE ISSUE:
When I create a strategy using "Strategy Builder" to try and scale out over the TDAMERITRADE connection, no matter the conditions for entry, the end result is each limit order increasing to the total position size, while the position size remains as configured. So, if I have a position of 2 shares and with 2 limit orders of 1 share exit each, they CHANGE automatically after submission within a few seconds to 2 share limit order exits. And then, because my position is "2," the position exits completely as soon as it hits the first target.
DETAILS OF THE ISSUE
- Inputs are defined for Quantity and Target on the "Inputs and Variables" menu.
- The desired position size is 2 for a long position using 2 market orders with 2 limit orders set for the targets.
- 2 market orders are setup on the 'Conditions and Actions' menu, each with its own signal.
- 2 targets are defined on the 'Stops and Targets' menu, each with its own exit signal, and pointing back to the specified entry signal.
- If I am connected to the 'Simulated Data Feed,' everything works as expected.
- If I connect to the TDAMERITRADE data, the problem begins. The orders will submit, but within a few seconds, each limit order DOUBLES, and my position remains 2.
- The position closes as soon as the 1st target is reached.
I noticed when I click the properties of the Strategy, and the "Stop and Target Submission" dropdown list changes from "PER ENTRY EXECUTION" to "BY STRATEGY POSITION" all by itself. It does not change when using the 'Simulated Data Feed.' If I reset the dropdown to "BY STRATEGY POSITION," the issue repeats. Why is this setting modifying itself? I think this is what is causing the problem. Or am I doing something wrong? Or is this some kind of problem with TDAMERITRADE data?
Please see attached screenshots, logs, and the script below (continued in next post). Please let me know where additional clarifications are needed.
Thank you for your time and valuable support!
Comment