Support Board
Date/Time: Thu, 16 Jan 2025 05:19:00 +0000
ACSIL Trade Submission using ChartDOM User Input
View Count: 1584
[2017-10-04 21:02:48] |
User232323 - Posts: 5 |
Hi, I was wondering if it would be possible to currently use ACSIL to submit orders based on user drawn chart objects. For instance, could I take the the last Entry/Exit/Stop from the Risk Reward tool and use ACSIL to enter it as an order? While the documentation for submitting BuyEntry/SellEntry orders requires autolooping, it also states that manual looping is possible. Could you also please advise regarding the syntax - which input is "index" and what index is that referring to? Thank you. |
[2017-10-05 04:35:26] |
Sierra Chart Engineering - Posts: 104368 |
Yes this is possible. You can get Chart Drawings already on the chart. Refer to this page for the function for that: Using Drawing Tools From an Advanced Custom Study We have updated the documentation here to explain the manual looping version of the Trade Order Action functions: Automated Trading From an Advanced Custom Study: Entry and Exit Order Action Functions 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 |
[2017-10-05 16:44:13] |
User232323 - Posts: 5 |
Regarding the first link, is there a way to only run the initial call to the study rather than refreshing on each loop? it appears that even with autolooping off, the study will automatically update on new streaming data Thanks again. |
[2017-10-05 18:21:49] |
Sierra Chart Engineering - Posts: 104368 |
You just need to check this variable and return when it is true: http://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scIsFullRecalculation 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 |
[2017-10-06 15:08:48] |
User232323 - Posts: 5 |
It appears this conflicts with then trying to enter an order, as I am getting an error message when trying to submit the buy/sell that: "Order entry skipped because full recalculation." from the following code: int Result = sc.BuyEntry(NewOrder, sc.Index); sc.AddMessageToLog(sc.GetTradingErrorTextMessage(Result), 0); which I have included in the IsFullRecalculation if statement as I also only want the resulting order to be sent once. Could you please advise? Thanks. |
[2017-10-06 18:01:34] |
Sierra Chart Engineering - Posts: 104368 |
as I also only want the resulting order to be sent once. If this is the objective, then just simply send it once by setting a flag variable that it has been sent and do not do it again.You can use persistent variables for this: sc.SetPersistentInt() 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: 2017-10-06 18:02:02
|
[2017-10-06 19:46:46] |
User232323 - Posts: 5 |
ok is there a suggested way to initialize persistent variables? I am having the issue that my persistent variables re-initialize regardless of the checks I try to enforce.
Date Time Of Last Edit: 2017-10-06 21:43:07
|
[2017-10-06 21:36:10] |
Sierra Chart Engineering - Posts: 104368 |
We do not provide programming help. Persistent variables always start at 0. This should be already documented.
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 |
[2017-10-06 21:39:37] |
Sierra Chart Engineering - Posts: 104368 |
One obvious mistake is that this line is not a reference to the persistent variable: int firstrun = sc.GetPersistentInt(1); It needs to be: int& firstrun = sc.GetPersistentInt(1); 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 |
To post a message in this thread, you need to log in with your Sierra Chart account: