Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 21:52:16 +0000



Post From: Spreadsheet

[2019-06-26 23:50:38]
Sawtooth - Posts: 3976
1. To capture change in direction of the SLOPE function output, try this:
Transition to positive:
=AND(Z4<0,Z3>0)
Transition to negative:
=AND(Z4>0,Z3<0)

2.
Disabling autotrading does not flatten a position; it merely turns off autotrading.
J8=0 is only used in J28 formulas so that exits and flattens can occur after autotrading is disabled.
The flatten formula doesn't need a time window; it only needs a single time to flatten.

You will probably want to use J45 instead of J11:
Spreadsheet Systems, Alerts and Automated Trading: Cumulative Closed Profit/Loss [J11]
Spreadsheet Systems, Alerts and Automated Trading: Closed Daily Profit/Loss [J45]

If you flatten when J10+J45>=1100, it is possible, because of slippage, that J45 could be less than 1100 when flat (J10 will be 0), allowing another entry.
You don't need to use absolute references ($) in column J.
If you are scaling in or using reversals, additional formulas might be required.

Try these formulas:
J28:
=AND(J8=0,OR(FRACTIME(J41)<TIMEVALUE("08:29:00"),FRACTIME(J41)>TIMEVALUE("10:30:00")),J45+J10>=1100)
J29:
=OR(FRACTIME(J41)>TIMEVALUE("10:30:00"),J45+J10>=1100)