Login Page - Create Account

Support Board


Date/Time: Sun, 06 Jul 2025 14:51:19 +0000



Trade Position Limit via ACSIL

View Count: 1286

[2019-03-01 00:34:06]
Chad - Posts: 238
I presume this exists in the docs already, so sorry in advance. But, I've looked for an ACSIL function to specify the Trade Position Limit (Symbol Settings >> Additional 2 tab) by-symbol, and I can't find one. Checked ACS_source\TradingSystem.cpp as well. I would do this in the Spreadsheet SfT study, but cell J66 is of course read-only and appears to be a 'global' setting that would affect all other sheets.

Is there an ACSIL fcn for this? I need for it to be dynamic, as I'm specifying it as a function of the Trade Service Account Balance, and values read by sc.DataFile for initial margin (if a futures contract) and a coefficient/percentage of the TSAB per some portfolio optimization logic.
Date Time Of Last Edit: 2019-03-01 00:49:43
[2019-03-01 00:54:57]
Chad - Posts: 238
...should I just use sc.MaximumPositionAllowed and ignore Trade Position Limit, using my own formula to scale the quantities for my 'scaled-in' multiple entries accordingly?
[2019-03-05 18:38:08]
Sierra Chart Engineering - Posts: 104368
In regards to post #2, yes that is the variable you will want to use.
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
[2019-03-24 22:01:35]
Chad - Posts: 238
One more follow-up Q on this: if I use sc.MaximumPositionAllowed to change the MPA, but also plan to use a Spreadsheet System for Trading Study to handle my orders, is it possible to write that via ACSIL to a cell in column H so I can use the dynamic value?

If that's impossible, would it require closing and re-opening the Chart & Spreadsheet so cell J66 reflects this? If so, is there an ACSIL function (or other method), to automate that cycle?
[2019-03-25 19:09:22]
Sierra Chart Engineering - Posts: 104368
Yes you can do that by using this function:
ACSIL Interface Members - Functions: sc.SetSheetCellAsDouble()

You need to set it into an unused cell.
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:

Login

Login Page - Create Account