Login Page - Create Account

Support Board

Date/Time: Sat, 20 Oct 2018 20:35:22 +0000

Cell Reference

Support Request:
[2018-01-02 21:04:14]
User612649 - Posts: 9
In the spreadsheet, how do I reference the value or tell the spreadsheet to follow the cell when doing its calculations.

Example: ID0.SG1@3
Value: 24779

I want to reference this same value when it moves down to ID0.SG1@4, or just save the value.

Absolute specifies the cell which is not what I want.
Relative will reference back to ID0.SG1@3 which is not what I want.

I want it to follow that specific cell or if I can, extract and save the value from that cell.

I tried INDIRECT(ID0.SG1@3). This didn't work.
Can I pull the content or numerical value from the cell and store it in a "J" column cell?
Date Time Of Last Edit: 2018-01-03 01:52:50
[2018-01-03 04:45:07]
Sierra Chart Engineering - Posts: 65030
Maybe someone has a suggestion, but inherently these types of things are more difficult to do with Spreadsheets as compared to ACSIL:
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-01-03 06:03:29]
tomgilb - Posts: 1974
Yes, this is possible with a spreadsheet study. You must use a Formula Column to create a persistent variable where it is brought to row 3 where you can reference it. You must use an event that can be identified with a formula, like this in P3:

There are many variations to this concept. You can use a second IF statement to set it to 0. You can count bars since an event.

You could also use the NMATCH function to find an event, then return a value with the INDEX function,
using a INDEX(...NMATCH(... combination:
This finds the most recent occurrence of the bar with 93 trades, and returns the Open price of that bar.
You might not need a Formula Column for this, depending on what you're doing.
[2018-01-03 13:43:48]
User612649 - Posts: 9
Thank you for your reply tomgilb,

All I am trying to do is not let the price fall below the low of the entry bar. I have my buy entry formula figured out. When my buy entry order triggers and puts me into a position, I do not want to allow price action to fall below the low of that bar.

In the Buy Exit (L3) cell, I was trying to use (ID0.SG4@3 < ID0.SG3@3). The problem that I am having is when the next bar occurs, this formula is incorrect referencing the new bar and not the first original ID0.SG3@3.

Can I put in a static stop order in at ID0.SG3@3 price point upon entry, so then I don't have to worry about keeping track of that bar, or would you suggest something different?
Date Time Of Last Edit: 2018-01-03 14:46:21
[2018-01-03 17:03:14]
tomgilb - Posts: 1974
Can I put in a static stop order in at ID0.SG3@3 price point upon entry
Not in the same bar as the entry.

My preference would be to use an Attached Orders' trade window config so that the stop is in the market, and move it with the Trade Management by Study study referencing a spreadsheet Formula Column containing a formula that returns the price.

This requires creating a persistent variable using the concept in post #3, where in your case, the event is the entry signal bar.
where the above formula is in P3, and the Trade Management by Study study references SG6 (column P).
[2018-01-03 18:37:40]
User612649 - Posts: 9

Thank you so so much for your help! I was able to accomplish what I was trying to by adding the "Trade Management By Study" study that you recommended.

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


Login Page - Create Account