Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 06:41:01 +0000



[User Discussion] - Question about exits on spreadsheet trading

View Count: 1177

[2014-01-21 20:19:43]
User14682 - Posts: 83
I want to exit half With this =AND(AA4>AC4,AC3>AA3)

And the other half with this =AND(AA4>AG4,AG3>AA3)

How do I exit partial positions on two signals????
[2014-01-21 20:46:13]
vegasfoster - Posts: 444
You control quantity in J26. If the first condition always happens before the second condition, then you can simply use

=If(AND(AA4>AC4,AC3>AA3), J5/2, if(AND(AA4>AG4,AG3>AA3), J5, "entry quantity")),

with "entry quantity" being whatever number of contracts you want to enter the original position. If either can happen first, then you will need to create a state first and adjust quantity based upon the state of your position. For example, in Z3 you would use

=If(or(K3=True, M3=True), 2, if(or(AND(AA4>AC4,AC3>AA3), AND(AA4>AG4,AG3>AA3)), Z4-1, Z4))

So this will give column Z a value of 2 if you have entered but not exited any, a value of 1 if you have exited part of your position, or 0 if you have exited all of your position. Then in J26 use

=If(J4=2, J5/2, if(J4=1, J5, "entry quantity"))

I haven't tested any of that, but I think it will work, let me know if you have any problems.
Date Time Of Last Edit: 2014-01-21 20:49:49
[2014-01-21 21:03:43]
User14682 - Posts: 83
FOR EXAMPLE: ENTER TOTAL POSITION 4 - WHAT IS THE CODE FOR 2 AND 2 USING THE FORMULA BELOW - WILL YOU ENTER QUANTITIES?

=If(AND(AA4>AC4,AC3>AA3), J5/2, if(AND(AA4>AG4,AG3>AA3), J5, "entry quantity")),

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

Login

Login Page - Create Account