Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 20:24:39 +0000



During replay back testing I can't close opened position by sc.CancelOrder()

View Count: 1027

[2015-01-15 14:00:33]
User27611 - Posts: 4
Dear sir,

during replay back testing I can't close opened position by sc.CancelOrder().

After my BuyLimit order was filled, IsWorkingOrderStatus() returns 0, so, sc.CancelOrder() returns error, because order is no longer opened and can't be canceled. Order number is same and I can see filled order in the Order and Positions window. So, how I can close opened position?
Thank you,
Alexander Vysotsky.
[2015-01-15 17:22:33]
Sierra Chart Engineering - Posts: 104368
You need to enter an opposite order. So you would enter a Sell market order to offset the position. Refer to:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#SubmittingAnOrder
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
[2015-01-15 19:03:24]
User27611 - Posts: 4
Thank you very much!
Everything works correct now!
Alexander Vysotsky.

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

Login

Login Page - Create Account