Login Page - Create Account

Support Board


Date/Time: Thu, 06 Mar 2025 16:30:44 +0000



Multiple Spreadsheet System for Trading on the same instrument

View Count: 1507

[2022-02-07 19:53:32]
FTDK - Posts: 13
It seems like it isn't possible to get to use multiple spreadsheets for trading on the same instrument without them interfering with each other.

The entries are fine, but the exits are an issue. If system 1 gets a signal to enter, it can get closed from system 2 or 3.

I have tried using attached orders, which works, but only with a preset value. Once i use the Trade Management by Study study, i run in to the same issue.
The entry goes fine, but the Trade Management by Study study can also use levels from the other systems instead of the system that triggered the initial signal.
The same goes for the L and N column, spreadsheet 1 can close the position it opened because the value of column N is true in spreadsheet 3.

I have tried giving each Spreadsheet it's own chart, with its own Trade Management by Study study, yet it kept using levels from the other charts as well.

I have read about this issue before, and back then the only solution to this issue was using multiple accounts, but that isn't something i want to do.

Is there another solution by now for this issue? Like for example adding an unique code per spreadsheet to the orders, so the spreadsheet only change orders with the same special code.
Or maybe allowing users to change the symbol name without changing the underlaying instrument, that way i could create the instrument ES1, ES2, ES3, ... the underlying instrument would be the same but that way the spreadsheets have a way to differentiate each instrument, i know this is possible with for example Multicharts, but i haven't found anything like this for Sierra Charts.

If anyway knows about a workaround, or if there is a solution, i would love to hear it.
If not i hope Sierra Charts will create some kind of work around since i really think this would benefit a lot of people and would make the Spreadsheet System for Trading much more useful.
Date Time Of Last Edit: 2022-02-08 06:49:28
[2022-02-08 06:49:44]
FTDK - Posts: 13
Would it help to (automatically) disable auto trading (J28) on spreadsheet 1 and 2 when i do get a valid entry on spreadsheet 3? Would this prevent spreadsheet 3 that is not disabled to use the levels from the spreadsheet that are disabled?

Edit: It looks like the answer to this one is no, it still uses the levels from the disabled spreadsheets.

I have tried using the L and N column but this wont work, since i need to use the $J$8 value to disable or enable auto trading, but the spreadsheet doesn't differentiate between an active order from spreadsheet 1 or spreadsheet 2, so once a trade is opened, auto trading will be enabled on all spreadsheets.

One thing i really don't understand, here is the situation:

Chart 1 has a spreadsheet for trading with a specific name and a trade management study, this chart has ES as selected instrument.
Chart 2 has a spreadsheet for trading with a different name and a trade management study, this chart also has ES as instrument.

Why does the trade management study from chart 1 uses the price levels from spreadsheet for trading on chart 2, which is on different chart, the spreadsheet has a different name and the spreadsheet's auto trading is disabled?
Why is the trade management study using levels from a spreadsheet that isn't selected in its options and isn't even on the same chart?

That doesn't make sense to me.
Date Time Of Last Edit: 2022-02-08 10:46:39
[2022-02-08 13:27:42]
FTDK - Posts: 13
I thought i figured out a solution, but yet again it doesn't work, to my surprise.

Chart 1 has a spreadsheet for trading and a trade management study, this chart has ES as selected instrument.
Chart 2 has a spreadsheet for trading with a different name and a trade management study, this chart also has ES as instrument.

What i have done this time is let the trade management study from chart 1 use spreadsheet for trading columns Q, R, S, T to get the stop and target price levels, for both shorts and longs.
And for chart 2 i used columns AD, AE, AF, AG to get the price levels from.

So chart 1 trade management study should look at Q, R, S, T to manage the attached orders.
So chart 2 trade management study should look at AD, AE, AF, AG to manage the attached orders.

However, i just had a trade triggered on chart 2, so based on spreadsheet 2. Yet the trade management study is using the levels from Q, R, S, T. Which belong to chart 1.
In the trade management settings for chart 2 i have selected AD, AE, AF and AG to manage the orders. How is it possible it is using Q, R, S, T?
[2022-02-08 15:11:28]
Sawtooth - Posts: 4181
Is there another solution by now for this issue?
I haven't tried this, but using a sub-instance for one of the systems might separate them sufficiently.

But you'll still have to deal with allowing only one system at a time to enter, so separate accounts might still be the only solution.
Date Time Of Last Edit: 2022-02-08 15:18:06
[2022-02-08 16:25:18]
FTDK - Posts: 13
Going to try it right away.

What would happen if the 2 systems both enter a trade? If they both go long that wouldn't be an issue.

But if one goes long and the other one goes short, i assume the short trade will close out the long trade, or the other way around depending on which one was triggered first?


Edit: first tests seem to be positive, the spreadsheets are no longer intervening with each other.
It just so happened that my spreadsheets had 2 different signals right after i got them setup for these different instances, 1 short and 1 long.

The long was on first and a few minutes later the spreadsheet triggered a short as well and the short did not close out the long, so both trades were open at the same time, until closed by the attached orders.

I am still in a demo environment to do testing and further develop this automated trading system, can Sierra Chart support please confirm if this would be the same in live trading?
Or would the short actually close out the long in live trading?
Date Time Of Last Edit: 2022-02-08 16:44:55
[2022-02-08 18:03:31]
Sawtooth - Posts: 4181
Legally, you cannot simultaneously hedge/wash trade the same symbol in the same account. See Rule 534:
https://www.cmegroup.com/rulebook/files/cme-group-Rule-534.pdf
[2022-02-08 22:27:50]
FTDK - Posts: 13
Alright, i am working on another potential solution but am now running into the next issue:

I have created 1 spreadsheet with both trigger formulas in them using =OR(IF(AND(FORMULA1), 1, 0), IF(AND(FORMULA2), 1, 0)

This does work to open the trades. If formula 1 is true it opens a trade and if formula 2 is true it opens a trade.

Now my thinking was that i could combine my formula including if K4=1, so if the formula opened a trade the previous bar, then calculate the point offset for the attached orders that can be used by the trade management study.

This does seem to work when i use the formulas separately, but once i combine them i get an incorrect number.

For example:

=IF(AND(K4=1, FORMULA1), Z3-D7, 0) - this formula does give a correct number
=IF(AND(K4=1, FORMULA2), Z3-D7, 0) - this formula does give a correct number

But once i combine them like i did with the 2 formulas to open a trade it goes wrong:

=OR(IF(AND(K4=1, FORMULA1), Z3-D7, 0), IF(AND(K4=1, FORMULA2), Z3-D7, 0)))

Now the formula still gives a result at the correct time, but instead of calculating the actual number, which is the Z3-D7 part, it only shows as 1 instead of the correct number.

I suspect i am doing something wrong in combining the 2 formulas, but i have done it in the exact same way as i have done it for the formulas that trigger the trade, and they do work correctly.

When i combine the 2 formulas like this example below i do get a correct number, however then it calculated the number every time K4=1 instead of when K4=1 and FORMULA1 or FORMULA2 are correct.

=IF(OR(K4=1, AND(FORMULA1)), Z3-D7, IF(OR(K4=1, AND(FORMULA2)), Z3-D7, 0)
Date Time Of Last Edit: 2022-02-08 22:41:49
[2022-02-09 01:04:20]
Sawtooth - Posts: 4181
You will need to isolate which formula was used to enter.
Try this:
- Put each Longs formula in its own Formula Column (e.g. O3 and P3), and use this example in K3:
=OR(O3,P3)
- Use two more Formula Columns to count the bars since each of the two signals, using these examples:
Q3:
=IF(O3, 1, Q4 + 1)
R3:
=IF(P3, 1, R4 + 1)
- When J8 > 0, the column with the greater count identifies the formula that was used, with a formula like this:
=IF(AND($J$8>0,Q3>R3),offset1,IF(AND($J$8>0,R3>Q3),offset2,0))
- Use one instance of the TMS study for only Longs, referencing its own Formula Column.

Replicate the above for the Short entries.
[2022-02-09 12:22:14]
FTDK - Posts: 13
I managed to get it working as i wanted to, first test seem to confirm that everything is working like it should.

Everything is in 1 spreadsheet now, it took me quite some time to develop this system. All formulas combined (all entry formulas and SL price level and TP price level formulas) are close to 8 A4 sides, so it was a lot of work and these 8 pages of formulas are just for 1 instrument. Luckily i can now just use the same formulas for any other instrument.

This is how i have done it to calculate the buy TP price levels (first 2) and short TP price levels (last 2):

=IF(AND(FORMULA1), Z3-(Z3-D7)-0.25, IF(AND(FORMULA2), Z3-(Z3-D7)-0.25, IF(AND(FORMULA1), Z3+(C7-Z3)+0.25, IF(AND(FORMULA2), Z3+(C7-Z3)+0.25, 0)))

And so on depending on how many different formulas you need.

So now i get the stop or target price level for formula 1, if formula 1 is true, if formula 2 is true i get the levels for formula 2, if none are true it displays 0. The system is designed in such a way that there is never more than 1 formula true at the same time.
I avoided getting multiple entries by only allowing 1 trade at a time and using the trading position quantity study in my formulas, so if a position is open and a new entry formula is true, it doesn't enter a trade and it doesn't calculate new stop or target levels.

In total i am using about 56 formulas (per instrument), just to calculate all the stop and target levels my different entry systems are needing.

I never expected it would be possible to create such a complex system in the Spreadsheet for trading study, but i am glad i didn't give up one it ;).
Date Time Of Last Edit: 2022-02-09 12:25:19

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

Login

Login Page - Create Account