Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 04:10:01 +0000



Basic question about a spreadsheet system for trading

View Count: 166

[2024-08-19 12:26:15]
AntoineOpala - Posts: 66
At the end of each day, I'd like to review and backtest the trades I've taken.

Obviously I already know my price of entry, my stoploss, etc...

When I write an entry price in the K3 cell (Buy Entry) from the spreadsheet, sometimes it enters a trade. Most of the time it doesn't. It enters at a very random price.

In cell J71, I wrote L to get a limit order when then SL to get a stop limit order. It doesn't change anything. Nothing triggers most of the time.

In the K3 cell, I've also tried writing =ID0.SG4@3 = [entry price] but nothing changes.

What should be done?

I am replaying charts from the moment I took the trade. For example, if I took an actual trade at 11:30, I'm going to replay the chart from 11:29.
[2024-08-19 14:03:07]
Sawtooth - Posts: 4120
K3 is the entry signal
J71 is the order type
J22 returns the Limit price

You need all three for a Limit order.
Date Time Of Last Edit: 2024-08-19 14:03:55
[2024-08-19 15:21:31]
AntoineOpala - Posts: 66
Here's how I have it set:

K3 is = E3 = 119.2
J71 is L
J22 is 119.2

This was a long play on the XOM stock at 10:15 today.

I'd like to trigger this trade again in simulation mode when I replay the chart from 10:14 onwards. The way I have it set up, it still doesn't trigger anything.

I tried changing K3 to ID0.SG4@3 = 119.2. I tried keeping J22 empty too.



Edit : the problem seems to be with rounding numbers. The only way to make this work is to change K3 to "= E3 > 119.19". In other words, use a great than sign instead of an equal sign.
The K column never shows TRUE or 1 as long as I keep an equal sign. With a greater than sign, it's recognized when the price goes above 119.19 and it becomes true.
Even though the E3 cell displays 119.2, the actual underlying number may be 119.20099199 or something approximately close but not exactly equal to 119.2. How to round it so it triggers regardless?

Edit #2: setting E3 to =MROUND(E3, 0.01) seems to be doing the trick.
Date Time Of Last Edit: 2024-08-19 16:16:30
[2024-08-19 16:31:02]
John - SC Support - Posts: 36309
Refer to the following:
Using the Spreadsheet Study: Imprecision of Floating-Point Numbers and Comparisons
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-19 23:19:23]
AntoineOpala - Posts: 66
Thank you for your replies. Last question :

I want to backtest whether a trade went to 3R or stopped out at -1R first.

I added a cell where I manually write down my entry price so it remains still.
I added another containing the size of my stoploss.
Another that says how many ticks must be overcome to reach 3R.
Another that says the hard price where 3R is.

I cannot seem to find a formula that would tell me which happened first after my entry : whether -1R or +3R.

How would you proceed?
[2024-08-20 15:07:57]
John - SC Support - Posts: 36309
There really is not a way to capture that information for each trade during a backtest. The only thing we can point out is there is an item in the spreadsheet for "Last Trade Profit/Loss". You may be able to do something with this.
For the most reliable, advanced, and zero cost futures order routing, use 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