Login Page - Create Account

Support Board


Date/Time: Fri, 24 Jan 2025 03:33:13 +0000



[Programming Help] - code problem

View Count: 848

[2018-12-31 01:48:09]
1234567 - Posts: 42
i have have past this code = C[-1] > ID1.SG1 and its keeps saying #SYNTAX! why is it doing that? and other it, like that code " C[-1] "


thank you

btw im using it in spreadsheets.
[2018-12-31 01:53:37]
Sawtooth - Posts: 4162
Spreadsheets use a different syntax. Try this in row 3:
=E4>ID1.SG1@3
Date Time Of Last Edit: 2018-12-31 04:48:04
[2018-12-31 02:26:38]
1234567 - Posts: 42
I trying to place a buy exits(sell) order, after i bought the previous stock, buy i have trouble with the code.
in the buy entry, that good. but i only want to place 1 buy exits(sell), buy not continuous buy exits(sell).
any help would be helpful thank you


buy exits(sell) = E3 - B3 = B3 - E3



thank you
Attachment Deleted.
Private File
[2019-01-01 01:05:23]
1234567 - Posts: 42
any Idea would be helpful:)
[2019-01-01 01:40:30]
Sawtooth - Posts: 4162
You'll need to create a persistent Buy signal that is released with the Sell signal, then find each transition.

In O3:
=IF(E4>ID1.SG1@3,1,IF(E3-B3=B3-E3,0,O4))
In K3:
=AND(O4=0,O3=1)
In L3:
=AND(O4=1,O3=0)

This is a variation of this example:
Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals

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

Login

Login Page - Create Account