Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 20:28:29 +0000



order quantity in spreadsheet auto trading

View Count: 2286

[2013-09-06 13:58:01]
User51517 - Posts: 58
Hello, I'm using spreadsheet auto trading and have set order quantity to 2 in attached trade window. I noticed this morning my filled order is only for 1 contract.

Is there anything I'm missing here? How do I correctly set order quantity for spreadsheet auto trading?

By the way, my max position allowed is also set to 2. Is this possibly the reason?
Date Time Of Last Edit: 2013-09-06 14:54:10
[2013-09-06 14:24:17]
Sawtooth - Posts: 3975
When using the Spreadsheet System for Trading study, cell J26 now overrides the Trade Window Quantity field. If J26 is blank, the default is 1.
[2013-09-06 14:59:09]
User51517 - Posts: 58
Thank you Tomgilb!

You're on top of everything related to spreadsheet studies/auto trading. Many times faster than SC support.

SC, kindly please add this to setting and input window for spreadsheet studies/auto trading. This is important for trade management.
Date Time Of Last Edit: 2013-09-06 15:09:01
[2013-09-06 18:34:34]
Sierra Chart Engineering - Posts: 104368
As has been said, you need to set the order quantity through J26. This is documented here:
http://www.sierrachart.com/index.php?l=doc/doc_SystemsAlerts.php#CellJ26
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
[2013-09-06 19:23:56]
User51517 - Posts: 58
OK thanks! Never noticed this before.

It actually opens up for possibilities to automate position sizing for non programmers. A good thing to know.
[2020-06-09 23:52:08]
User857051 - Posts: 10
I had J26 blank and got zero fills on a 3x trade window count. Only had to wait a day for the signal though. :(

Wish SIM had these rules.
[2020-11-04 02:29:33]
User32428 - Posts: 19
Great feature!

Is it possible to set the trade quantity in the spreadsheet and use this quantity for manual trading from another window or DOM?

I have an automated position sizing calculation that changes rapidly when scalping. My trades are however entered manually. Would be great to be able program the spreadsheet to calculate the lotsize and automatically send this to the trade window / DOM for manual execution of entry.

Apologies if this has been covered elsewhere
[2020-11-05 20:44:11]
Sierra Chart Engineering - Posts: 104368
Would be great to be able program the spreadsheet to calculate the lotsize and automatically send this to the trade window / DOM for manual execution of entry.
This can be done by using ACSIL:
Advanced Custom Study Interface and Language (ACSIL)

Specifically refer to:
sc.GetSheetCellAsDouble()
ACSIL Interface Members - Variables and Arrays: sc.TradeWindowOrderQuantity
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
[2023-12-22 03:46:21]
j4ytr4der_ - Posts: 914
I've been using spreadsheets for some time with an ACSIL study to control position sizing via sc.TradeWindowOrderQuantity. I hadn't touched it for a few weeks and have come back to it again, and the spreadsheet no longer picks up the order quantity from the trade window. It is set correctly, I can see it in the UI and also in a subgraph from my study - the order quantity is correct, but the spreadsheet is always just quantity 1.

I can certainly do the sizing via formula in the spreadsheet, but for performance reasons I much prefer to do this directly via ACSIL instead. And given that I already have it working... I just need to figure out why this function now fails.

Anyone have any suggestions or is this just no longer possible at all? That would sure be a shame.
[2023-12-26 07:24:01]
User61168 - Posts: 342
ACSIL study to control position sizing via sc.TradeWindowOrderQuantity
Interesting solution you got here. Will this ASCIL study work with Automated trading using simple alerts also? Auto-Position sizing capability does not exist for simple alerts unless there is a way that I am not aware of.
Date Time Of Last Edit: 2023-12-26 07:24:28
[2023-12-26 14:18:42]
j4ytr4der_ - Posts: 914
You can do it easily in a spreadsheet, and that's what I'd previously been doing but I wanted to take it up a notch and avoid the spreadsheet system, so I built an ACSIL version instead. But yes you can define your order quantities and max position size quite easily with a spreadsheet system with alert formula syntax.
Date Time Of Last Edit: 2023-12-26 14:18:52
[2023-12-27 05:04:23]
User61168 - Posts: 342
so there is no way in ASCIL to auto-adjust the position qty and make it work for trading with simple alert system? I do have a funky way to adjust position size in simple alert trading algo but it requires scale in/out to be enabled and the entry/exit studies to be replicated to increase position size. Not at all ideal and it also get tricky with stop/reverse flips. Anyways, thanks for your response. I wish there was a way to do this in ASCIL.
[2023-12-27 22:15:27]
j4ytr4der_ - Posts: 914
I don't see why you couldn't do this in ACSIL, if anything that's going to be infinitely more flexible in terms of what you can do. But it will require being able to program it how you want it. Far fewer limitations in ACSIL than alert formulas.
[2023-12-28 06:16:33]
User61168 - Posts: 342
duh! I keep forgetting that all alert studies are written in ASCIL with sample code provided for us to modify.. so anything in ASCIL is possible :-
[2023-12-28 15:16:46]
j4ytr4der_ - Posts: 914
Yep, you can learn a lot just by looking at the included source code and messing around. That's how I started, and between that, some googling, and a lot of assistance from chatGPT, I now can build my own full studies that do all kinds of useful stuff that SC doesn't do natively. I then use those to inform my study or spreadsheet trading systems. I haven't built any ACSIL trading systems yet, but I will almost certainly head that direction.

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

Login

Login Page - Create Account