Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 13:59:41 +0000



[Programming Help] - Reset Condition on New Bar- J72

View Count: 1047

[2020-02-10 05:45:32]
User190501 - Posts: 92
Hi Support,
Spreadsheet study for trading has this input "Reset Condition on New Bar" that is applicable for the Formula columns. How can we apply a similar condition for the J column. I am setting J72 cell by a condition and would like to reset it after each bar to enable me cancel all working order except the working attached orders.

Thanks
[2020-02-10 18:37:55]
Sierra Chart Engineering - Posts: 104368
This is not supported for the J column.
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
[2020-02-10 19:51:46]
User190501 - Posts: 92
Is there any tip for how a formula in J column reset its condition to false at New bar using coding ?
[2020-02-12 04:20:57]
Sawtooth - Posts: 3976
...cancel all working order except the working attached orders.
Use cell J78 for this.
Spreadsheet Systems, Alerts and Automated Trading: Cancel All Orders except working Attached Orders [J78]

To reset at each new bar, try something like this:
=AND(FRACTIME(J41)>=FRACTIME(A3),FRACTIME(J41)<FRACTIME(A3)+5/86400)
This will go TRUE at the bar open, and go FALSE after 5 seconds. This assumes there is a chart update in the 1st 5 seconds of the bar.
[2020-02-13 22:41:38]
User190501 - Posts: 92
Thanks a lot tomglib for the response. As stated, the objective is to cancel all working orders except attached working orders whenever a condition of new entry holds true. From the main settings of the spread sheet study you can reset K3, M3 at the start of a new bar.
for example, if a down bar comes in an up trend , I set entry stop order 1 tick above the high , and got up bar in a down trend, I set a sell stop order 1 tick below the low, this will form K3, M4 conditions --- The same condition but at 4 not at 3 , i.e K4, and M4 is used for the cancellation in J78 as J column cannot accept update from 3 for some reason !
The problem happens if there is a series of down bars after each other in up trend or a series of up bars after each other in a down trend, the conditions for entry will not change as it holds true all the time from 4 stand point in the J column but for sure K3, M3 are reset at each new bar condition. I have added your suggestion and still it doesn't work and the formula is as below ... I would appreciate your kind support..
=AND( OR(K4,M4), AND(FRACTIME(J41)>=FRACTIME(A3),FRACTIME(J41)<FRACTIME(A3)+5/86400) )
[2020-02-14 23:31:40]
Sawtooth - Posts: 3976
'Reset Condition On New Bar' only applies to Formula Columns.

For formulas in Column J:
For first occurrence intrabar signals, reference row 3 of Formula Columns.
For close-of-bar signals, reference row 4 of Formula Columns.

Are your K3/M3 signals intrabar or close of bar?
[2020-02-14 23:55:27]
User190501 - Posts: 92
K3/M4 are close of bar and I also selected signal once per bar.

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

Login

Login Page - Create Account