Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 13:01:06 +0000



Post From: sort of a statete machine in a spreadsheet

[2014-06-08 20:17:15]
eagle - Posts: 92
I do this a little differently, with no circular reference.

I use four Formula Columns. I'll use AU3, AV3, AW3, AX3 in this example. This example uses a 300 row spreadsheet.

In AU3 (labeled Last Buy):
=MATCH(TRUE, K4:$K$300, 0)

In AV3 (labeled Last Sell):
=MATCH(TRUE, M4:$M$300, 0)

In AW3 (labeled Buying Mode):
=AU3<AV3

In AX3 (labeled Selling Mode):
=AU3>AV3

Either AW3 or AX3 will always be TRUE, and the other one will always be FALSE. (So, of course, you don't really need both columns.)

I use these with my Buy Exit and my Sell Exit.

In L3, Buy Exit:
=AND(NOT(M3),AS3<(-11),AW3)

In N3, Sell Exit:
=AND(NOT(K3),AS3>11,AX3)

I am not a programmer.

Date Time Of Last Edit: 2014-06-08 20:21:56