Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 18:44:51 +0000



[Programming Help] - Issues with Automated Entry

View Count: 258

[2023-10-27 10:32:04]
Nkrastins - Posts: 34
Hi SC,

can you please help me write the correct syntax for my automated entry?

Instrument: Gold Futures

timeframe: 5min

Strategy: go long when current close is less than open, buying absorption for two levels(using TwoFox's custom study), and last price is 1 tick above highest absorption.

I have set in spreadsheet settings Signal Only On Bar Close to NO.

In my case, my absorption study is ID5 with buying absorption levels SG1 and SG2, on sheets CZ3 and DA3.

I tried this formula for the entry:

=AND(B3>E3,E3==(CZ3+0.1),E3==(DA+0.2)) - This gives SINTAX error.

and I tried as well


=AND(B3>E3,E3=(CZ3+0.1),E3=(DA+0.2)) - Gives no signals.

Note: I want to enter a trade as soon as I have this condition, I don't want to wait till end of bar.

P.S. Strategy example image, shows green closed bar, but at the time of formation, bar was down since the open.
imageCapture.PNG / V - Attached On 2023-10-27 10:17:24 UTC - Size: 63.88 KB - 80 views
imageCapture1.PNG / V - Attached On 2023-10-27 10:21:44 UTC - Size: 7.53 KB - 81 views
[2023-10-27 11:23:56]
User907968 - Posts: 823
=AND(B3>E3,E3=(CZ3+0.1),E3=(DA+0.2))

Assuming that you copied directly from the spreadsheet DA is missing the row number.

If that is not the problem, how do you know which of SG1 and SG2 is highest?
Is SG1 always the highest, or do you need to test which is the highest?

For example:
=AND(B3>E3,E3=(MAX(CZ3,DA3)+0.1),E3=(MIN(CZ3,DA3)+0.2))
[2023-10-27 14:42:13]
Nkrastins - Posts: 34
Thank you,

it was a typo, I meant cell DA3.

based on my understanding SG2 should be the higher one.

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

Login

Login Page - Create Account