Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 20:35:22 +0000



[User Discussion] - Spreadsheet trading question about using IF for multiple entries??

View Count: 1091

[2014-06-06 16:38:58]
User14682 - Posts: 83
I am interested in entering the position on this code:

=OR(AND(AA4>AG4,AA5<AG5,AG4>AC4,AG4>AE4,E4>AG4),AND(AA4>AE4,AA5<AE5,AE4>AC4,AE4>AG4,E4>AE4))

and adding to the position ONLY IF THE FIRST CODE HAS ALREADY TRADED utilizing this code:

AND(AA4>AC4,AA5<AC5,AC4>AG4,AC4>AE4,E4>AC4))

Any idea on how to write this???

THANKS
[2014-06-06 17:32:01]
Sawtooth - Posts: 4120
Assuming your order quantity is 1, and you only want to add to the position once, here's a simplistic way:

=OR(AND($J$8=0,AA4>AG4,AA5<AG5,AG4>AC4,AG4>AE4,E4>AG4),AND($J$8=0,AA4>AE4,AA5<AE5,AE4>AC4,AE4>AG4,E4>AE4),AND($J$8=1,AA4>AC4,AA5<AC5,AC4>AG4,AC4>AE4,E4>AC4))

There are other more involved ways to do it in different situations.


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

Login

Login Page - Create Account