Login Page - Create Account

Support Board


Date/Time: Mon, 27 Jun 2022 02:51:57 +0000



[User Discussion] - Spreadsheet trading question

View Count: 881

[2014-02-28 20:35:08]
User14682 - Posts: 83
How do I enable a second entry only when the first enry is satisfied?

My cuttent buy signal: =OR(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3),AND(AA3>AE3,AA4<AE4,E3>AC3,AE3>AG3,AE3>AI3))


They work but I only want the secont entry to trigger once the first is satisfied.

I apprecieate and feedback

THANKS
[2014-03-01 03:00:21]
vegasfoster - Posts: 444
I think what you are asking how to enter if condition 2 is true, but only if condition 1 is also true. In that case you would use,

=if(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3), if(AND(AA3>AE3,AA4<AE4,E3>AC3,AE3>AG3,AE3>AI3), True, False), False)

If condition 1 can result in an entry and then later condition 2 could result in additional entry, but only if condition 1 is currently in a position, then let me because that would be different.
[2014-03-01 20:13:02]
User14682 - Posts: 83
If condition 1 can result in an entry and then later condition 2 could result in additional entry, but only if condition 1 is currently in a position, then let me because that would be different.


THE ABOVE STATEMENT IS EXACTLY WHAT I NEED. CAN YOU HELP???

ALSO HOW DO I CONTROL QUANTITY: (J26) IF I AM PLACING 2 LOTS ACCUMULATING TO 4 TOTAL.... I have implemented 2 exits, although sometimes they trigger on the same bar, not fully exiting the position.. Please help..

Current buy exit example : =OR(AND(AA3<AG3,AA4>AG4),AND(AA3<AI3,AA4>AI4))
[2014-03-02 01:48:32]
vegasfoster - Posts: 444
Did you see my post here in your other thread here? https://www.sierrachart.com/SupportBoard.php?PostID=26626#P26626 I just realized you were the same person, so forget about my instructions there, we are going to start over from scratch.

Before I can do that, I need to know specifically how you are exiting each position,
1) Are you exiting through formulas? If so, what are they? or
2) Are you exiting through attached orders?
3) Are you are exiting both positions at the same time, or can you exit position 1 while position 2 is still open, or can you exit position 2 while position 1 is still open, or can either be true?
4) If position 1 is open, and position 2 closes, can you reenter position 2 again at a later time?
Date Time Of Last Edit: 2014-03-02 01:49:51
[2014-03-02 04:25:04]
User14682 - Posts: 83
First of all you are the best!!!! Note: The info is based on longs and shorts are just the opposite.

Current Signal: =OR(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3),AND(AA3>AE3,AA4<AE4,E3>AC3,AE3>AG3,AE3>AI3))

Condition 1 results in entry - Condition 1 - =OR(AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3)

Later condition 2 results in an entry only when position 1 is open - Condition 2 - AND(AA3>AE3,AA4<AE4,E3>AC3,AE3>AG3,AE3>AI3))

4) If position 1 is open, and position 2 closes, can you reenter position 2 again at a later time? potentially but not based on the info provided. Lets say NO

Exit Condition : =OR(AND(AA3<AG3,AA4>AG4),AND(AA3<AI3,AA4>AI4))

3) Are you are exiting both positions at the same time? YES

to keep it simple I would be open to exiting both positions at the same time. The reason I have 2 conditions is because I have quantity set at 2 and if I have 4 positions on im trying to exit entire position. Sometimes the conditions generate both signals on one bar only liquidating 2 of the 4 positions. Not good

I would be happy to exit entire position on this condition: =AND(AA3<AG3,AA4>AG4)


1) Are you exiting through formulas? If so, what are they? =OR(AND(AA3<AG3,AA4>AG4),AND(AA3<AI3,AA4>AI4))


2) Are you exiting through attached orders? NO


I hope you understand what i wrote and Thanks again!!!!!!!!!!!!!

Brandon

Let me know if I can further clarify
[2014-03-03 23:19:05]
vegasfoster - Posts: 444
In K3, =OR(S3=2, T3=2)
In L3, =R3

In P3, =AND(AA3>AG3,AA4<AG4,AG3>AC3,AG3>AE3,AG3>AI3)
In Q3, =AND(AA3>AE3,AA4<AE4,E3>AC3,AE3>AG3,AE3>AI3)
In R3, =OR(AND(AA3<AG3,AA4>AG4),AND(AA3<AI3,AA4>AI4))

In S3, =If(P3=True, 2, if(R3=True, 0, S4))
In T3, =If(AND(S3=2, Q3=True), 2, if(R3=True, 0, T4))
In U3, =If(R3=True, S4+T4, 0)

In J26, =S4+T4+U4
note: not S3+T3+U3, J26 updates before the order is placed, so need to lag a row behind

I haven't actually tried this, so I would test longs first to keep it simple, then replicate same for shorts in separate columns. Let me know if you have issues.

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

Login

Login Page - Create Account