Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 13:50:59 +0000



[Programming Help] - help with spreadsheet #CREF! with reference cell value

View Count: 342

[2023-08-24 08:57:53]
User651753 - Posts: 77
I am trying to create a spreadsheet trade study.

I want to start with a "base" price of $100 and create an entry only if the price has stayed between $40 range ($80> $120)

when the price increases to $150 I want to increase the "base" price by $50 price so now the study will continue to trade while around $130> $170 ( if the price decreases to $50 I want to trade $30>$70)

I116 = "base price" J116 = 100
I117 = "change base target" J117 = 50

I120 = "is current price higher base + change" J120 = =if(J113>(J116+J117),"YES","NO")
I121 = "is current price below base + change" J121 = =if(J113<(J116-J117),"YES","NO")
I122 = "what to do with base" J122 = =if(J120="YES","increase",if(J121="YES","decrease","do nothing"))
I123 = "new base" J123 = =if(J122="increase",J116+J117,if(J121="decrease",J116-J117,0))

I want J116 = J1232 but then I get #CREF!
Attachment Deleted.
attachmentup down system.scss - Attached On 2023-08-24 08:54:57 UTC - Size: 38.22 KB - 236 views
imageSierraChart_64_F3JorMRsJc.png / V - Attached On 2023-08-24 08:55:24 UTC - Size: 8.31 KB - 78 views
[2023-08-24 15:41:52]
Sierra_Chart Engineering - Posts: 17191
Circular references are not supported.

We cannot provide formula help for this.

Maybe a user would be able to help you.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-08-25 02:56:27]
Sawtooth - Posts: 4120
It's unclear what you want to do.

- J113 is always greater than J116+J117
- Price at $150 leaves a gap between the upper $40 range of $120 and $150.
- J116 will never equal J123
- MROUND rounds up or down to a multiple, it doesn't always rounddown.

Please explain "Base Price".
[2023-08-25 10:29:14]
User651753 - Posts: 77
base price = starting price and the area I want the study to trade around, I want to be able to increase/decrease the base price
[2023-08-25 14:44:59]
Sawtooth - Posts: 4120
base price = starting price and the area I want the study to trade around,
This sheds no new understanding of what you want to do.

From your original post, it seems the 'base price' is a trading price range, +/- half of the 'base price', from a starting price.
Is this correct?

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

Login

Login Page - Create Account