Support Board
Date/Time: Fri, 27 Dec 2024 18:33:40 +0000
ACSIL - modify Trail and Trigger offsets for Triggered Trail Stop
View Count: 1759
[2016-02-16 23:47:46] |
rhovega - Posts: 279 |
Hi SC, Need to modify in ACSIL the Trail and Trigger offsets for a Triggered Trail Stop. Documentation here http://www.sierrachart.com/index.php?l=doc/doc_ACSILTrading.html#OrderModification indicates only OrderQuantity, Price1, Price2, InternalOrderID can be modified. How can Trail and Trigger offsets be modified? Enabling "Adjust Trail Offset When Modifying Trail Order" under Chart Trade Settings would not help. I need to link Trail and Trigger offsets to ATR, to make them dynamic. If not possible, would you consider allowing the sc.ModifyOrder function to use the s_SCNewOrder TriggeredTrailStopTriggerPriceOffset and TriggeredTrailStopTrailPriceOffset members? Thank you Date Time Of Last Edit: 2016-02-17 00:01:19
|
[2016-02-17 01:15:12] |
Sierra Chart Engineering - Posts: 104368 |
Trail and Trigger offsets for a Triggered Trail Stop
Both of these cannot be modified together and there are no plans to support this now.You need to cancel the existing order and resubmit it. 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 |
[2016-02-19 05:44:22] |
rhovega - Posts: 279 |
Any chance you could you please provide a simple example of canceling and immediately resubmitting an OCO target+stop bracket? There is only one example of something similar in the tradingsystem.cpp templates, for canceling and then recreating on the bar after a simple market order. There are also no OCO examples. Thank you |
[2016-02-19 20:17:40] |
rhovega - Posts: 279 |
As per documentation here: http://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#Price1 I understand that the following should create a new OCO bracket, with a limit at 32 and a stop at 30. But it doesn't. Neither does replacing Price1 and Price2 by Target1Price and Stop1Price. s_SCNewOrder NewOrder; NewOrder.OCOGroup1Quantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_OCO_LIMIT_STOP; NewOrder.TimeInForce = SCT_TIF_GTC; NewOrder.Price1= 32; NewOrder.Price2= 30; |
[2016-02-19 21:31:06] |
Sierra Chart Engineering - Posts: 104368 |
"But it doesn't" is far too vague for us. It does not mean much to us. We need more details. What is the error value returned from the function being used? What does the Trade >> Trade Activity Log >> Trade Activity show for the orders? An example of an OCO order can be found in: /ACS_Source/TradingSystem.cpp >> scsf_ACSILTradingOCOExample 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: 2016-02-19 21:31:31
|
[2016-02-19 21:52:57] |
rhovega - Posts: 279 |
// Buy when the last price crosses the moving average from below. if (sc.CrossOver(Last, SimpMovAvgSubgraph) == CROSS_FROM_BOTTOM && sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED) { s_SCNewOrder NewOrder; NewOrder.OCOGroup1Quantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_OCO_LIMIT_STOP; NewOrder.TimeInForce = SCT_TIF_GTC; NewOrder.Price1 = 32; NewOrder.Price2 = 31; That generated a buy after moving average crossed from below at bar close. At market I believe. I expected to create an OCO limit at 32 and a stop at 31, rather than buying at market (@31.66). It generated no record in either the Trade Service Log nor the Trade Activity Log. Do not understand how can it be that it shows no record. The position created by this does show under Trade Stats for Charts. Simply used the simplest template in tradingsystem.cpp and inserted the s_SCNewOrder NewOrder above (attached just in case). The example in scsf_ACSILTradingOCOExample is not applicable. It uses SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP. The purpose is creating an OCO bracket only, not an order with an OCO bracket attached. Date Time Of Last Edit: 2016-02-19 23:39:49
|
[2016-02-19 22:14:16] |
rhovega - Posts: 279 |
So I guess it is inputting NewOrder.Price1 = 32 as limit and thus executing at market. But flipping the order as shown below generated no orders. s_SCNewOrder NewOrder; NewOrder.OCOGroup1Quantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_OCO_LIMIT_STOP; NewOrder.TimeInForce = SCT_TIF_GTC; NewOrder.Price1 = 31; NewOrder.Price2 = 32; Different issue, same outcome. Date Time Of Last Edit: 2016-02-19 22:16:12
|
[2016-02-19 22:47:47] |
Sierra Chart Engineering - Posts: 104368 |
What is the purpose of telling us this: So I guess it is inputting NewOrder.Price1 = 32 as limit and thus executing at market.
The answer should be obvious to you especially when you look at the Trade Activity Log: https://www.sierrachart.com/index.php?page=doc/doc_TradeActivityLog.php Why did the order fill? You are able to answer this far better than us. You tell us why the order filled. How are we supposed to answer that? But flipping the order as shown below generated no orders.
OK, explain to us why this is the case? How are we to know? Different issue, same outcome. We are not here on this Support board to be helping to this kind of an extent and answering questions which we cannot answer. 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: 2016-02-20 02:13:55
|
[2016-02-19 22:55:22] |
rhovega - Posts: 279 |
Can you please simply provide an example of using SCT_ORDERTYPE_OCO_LIMIT_STOP? The details are not relevant, did not provide them to pester you, but because YOU ASKED. There is no example of a SCT_ORDERTYPE_OCO_LIMIT_STOP order anywhere in your website or documentation. If you simply provide an example of SCT_ORDERTYPE_OCO_LIMIT_STOP all my posts from #4 onwards become irrelevant. |
[2016-02-19 22:59:46] |
Sierra Chart Engineering - Posts: 104368 |
We are declining further help in this thread. We are going out of our way to help and as a matter of policy we do not provide programming help and you should not expect that. You will need to refer to a programmer here: https://www.sierrachart.com/index.php?page=doc/SierraChartStudyAndSystemProgrammers.html It generated no record in either the Trade Service Log nor the Trade Activity Log.
We just saw this. The Trade Activity Log is what logs order activity. It is the comprehensive log. Not the Trade Service Log. If you see the Position on the Trade Stats for Charts tab, then there must be a Trade Activity Log entry. Therefore, you are not properly using the Trade Activity Log. That is the only issue based upon what you are saying.
Do not understand how can it be that it shows no record. The position created by this does show under Trade Stats for Charts. 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 |
[2016-02-19 23:05:07] |
Sierra Chart Engineering - Posts: 104368 |
We deleted the last post because it was incorrect. The particular order type you are using cannot use the OCO example we referenced.
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 |
[2016-02-19 23:06:10] |
rhovega - Posts: 279 |
I understand your position. Please don't get upset here. Did not mean to flood you with irrelevant details and clutter your inbox. I simply need to use order type SCT_ORDERTYPE_OCO_LIMIT_STOP There is no example of a SCT_ORDERTYPE_OCO_LIMIT_STOP order anywhere in your website or documentation. /ACS_Source/TradingSystem.cpp >> scsf_ACSILTradingOCOExample provides an example of SCT_ORDERTYPE_OCO_BUY_STOP_SELL_STOP. Very different types of OCO. One creates two resting orders, the other create an entry with attached order. That's all |
[2016-02-19 23:14:09] |
Sierra Chart Engineering - Posts: 104368 |
The documentation explains here how to use the SCT_ORDERTYPE_OCO_LIMIT_STOP order type: https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#OrderTypeConstants The OCO order example we linked to previously, was not right for that particular order type that you want to use. At the moment this is all the help we can provide. We do not have any other examples. 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 |
[2016-02-19 23:39:18] |
rhovega - Posts: 279 |
For reference of others looking into the same, got it to work as follows: s_SCNewOrder NewOrder; NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_OCO_LIMIT_STOP; NewOrder.TimeInForce = SCT_TIF_GTC; NewOrder.Price1 = 1.1110; NewOrder.Price2 = 1.1150; int Result = sc.BuyEntry(NewOrder); This order type does not use NewOrder.OCOGroup1Quantity but rather NewOrder.OrderQuantity. |
[2016-02-20 02:12:26] |
Sierra Chart Engineering - Posts: 104368 |
OK good. Also one thing we questioned previously, to ourselves, was whether you were using offsets for the prices or the actual prices? We could not tell. We thought maybe you are trading crude oil or something like that based upon the prices we saw.
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: 2016-02-20 02:12:53
|
To post a message in this thread, you need to log in with your Sierra Chart account: