Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 00:43:59 +0000



[User Discussion] - How to have only 1 trade per candle with timed entry from spreadsheet

View Count: 505

[2022-09-10 23:08:23]
bradyfans - Posts: 16
I have somehow successfully created my first spreadsheet trading system. I've only noticed one issue with it during backtesting and would love some help figuring it out. The system is supposed to take a trade at 08:30:00 if certain conditions are met. On one day, a long was triggered, stopped out, then another long triggered and stopped out again. I only want it to trigger one trade per day, if the conditions are met. The conditions were met, but 2 trades were triggered. See the second trade on the image.

https://www.sierrachart.com/image.php?Image=1662850071349.png

I thought this may be because it was using the whole candle at 08:30:00, not just the candle start time. I went in and changed the settings in the spreadsheet to "signal only once per bar," as in the other attached image, but it didn't change anything. Am I missing something? Is there some setting to trigger the trade only at the open price of the candle? I thought using the B3 value in my spreadsheet calculation would handle this, so I'm kind of at a loss, especially with the "signal only once per bar" set to yes.

Thanks!
imageScreenshot 2022-09-10 185740.png / V - Attached On 2022-09-10 22:59:52 UTC - Size: 96.74 KB - 70 views
[2022-09-11 01:14:03]
Sawtooth - Posts: 3993
One way to assure only one entry per day is to compare J41 to J42, like this in your entry K3/M3 formulas:
=AND(YourOtherEntryConditions,INT($J$41)>INT($J$42))
The INT (integer) of the DateTime is the date only.

The 'Signal Only Once Per Bar' set to Yes should only allow one entry in the 08:30:00 bar.
If you'd like to troubleshoot why that is not working as expected, take a closer look at your K3 formula.
And look at entries in the Trade Activity log's *Trade Activity tab on the day the spurious entry occurred.

You can DM me, if you like.
[2022-09-11 14:17:34]
bradyfans - Posts: 16
Thanks Tomgilb. This issue happened twice running the back test from the replay control panel. But I reran the back test 4 more times from the trade tab and it didn't happen. Not sure what the issue was, but it seems to have resolved itself. Thanks again.
Date Time Of Last Edit: 2022-09-11 14:17:59

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

Login

Login Page - Create Account