Login Page - Create Account

Support Board


Date/Time: Tue, 11 Mar 2025 02:32:11 +0000



[Programming Help] - Eliminating consecutive Buy/Sell Entry signals

View Count: 5792

[2018-05-08 14:57:58]
User606491 - Posts: 164
Regarding the spreadsheet system for trading:

Certain formulas trigger multiple consecutive entry signals. How do I adjust my formulas so that I'm only executing an entry (and receiving an alert) on the first signal?

A formula such as =if($J$8>0,[buy formula]=0,[buy formula]) will not work because I want to execute later entries (alerts) for pyramiding purposes.

One method may be =if(and($J$8>0,[buy formula]@4:@10=1),0,[buy formula]), but this isnt elegant.

Do you suggest another way to receive only one entry signal
[2018-05-08 15:07:33]
Sawtooth - Posts: 4181
You'll need to create a persistent variable that initiates at the first signal, and releases at another condition. Here is an example:
Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals
[2018-05-08 15:49:48]
User606491 - Posts: 164
Thank you Tom. Will try this tonight.
[2019-02-23 16:52:17]
User917679 - Posts: 76
You'll need to create a persistent variable that initiates at the first signal, and releases at another condition. Here is an example:
Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals

In that section, what is the plain-english logic of "=AND(P4, P3 = 0)"? I'm a bit confused over the necessity of P4 for some reason..

EDIT:

nvm

got it.
Date Time Of Last Edit: 2019-02-24 14:46:49
[2022-04-26 06:56:23]
DayTraderEsad - Posts: 121
Is it possible to do this in a normal alert without using spreadsheets?
[2022-04-26 12:27:18]
Sawtooth - Posts: 4181
Is it possible to do this in a normal alert without using spreadsheets?
You could do it with the Spreadsheet Formula study, in its Formula field.
(This study uses Alerts syntax, despite its name)

Use a formula like this:
=IF(persistentcondition,1,IF(releasecondition,0,ID1.SG1[-1]))
where ID1 is the Spreadsheet Formula study.
Date Time Of Last Edit: 2022-04-26 12:27:30

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

Login

Login Page - Create Account