I am using the sample code from ExampleLimitEntryandStopProfit. For this example, let's say it is short.
I enter using EnterShortStopLimit...that works fine.
I can put the take profit entry on using ExitShortLimit and giving it a target...that works fine.
When I put the stop on using ExitShortStopLimit I get an error message saying that "Limit price cannot be smaller than stop price" and it gives me the affected order.
If I manually place an order on the screen I will click sell the Ask.
Then right click and place a Buy Stop Limit order above the entry.
Then I right click again and place a Buy Limit order for the take profit.
I am trying to do the same thing in the program.
A secondary question is if there is a good OCO example so if a stop or target is hit the other order is removed.
Thanks
Comment