Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 01:50:12 +0000



[User Discussion] - Spreadsheet Study for trading Question

View Count: 587

[2017-02-21 21:24:10]
User352023 - Posts: 20
Hi,

I am trying to do a backtest for a simple strategy which has a target value calculated from the buy entry bar. I am getting the buy entry but the issue I am having is with the buy exit.

Since the target is calculated on the bar that triggered the buy entry, I need to look up some values from that row to exit. What is the best way to lookup study values on the candle that generated the buy entry.

Thank you
[2017-02-22 00:37:30]
Sawtooth - Posts: 3996
Here's one way:
=IF(K3,Q3,S4)
Where the formula in is S3, the lookup is in column Q, and the entry is in column K.

Here's another way that gives the same result:
=INDEX(Q3:Q1002,MATCH(1,K3:K1002,0),1)
This doesn't have to be in a Formula Column if you only need the most recent entry's corresponding value, and you only need the value in one non-repeating cell.
[2017-02-22 03:44:52]
Sierra Chart Engineering - Posts: 104368
You just simply need to reference them.

Refer to:
Working with Spreadsheets: Cell and Range References

The study values would be on the very same row as the row that the buy entry occurred at.
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