Support Board
Date/Time: Wed, 27 Nov 2024 12:31:42 +0000
Post From: Automated Trading System AND logic
[2019-07-17 19:22:51] |
Sawtooth - Posts: 4120 |
The Volatility Trend Indicator study appears to be similar to the Parabolic study, in that if price crosses the previous value, it switches sides. The formulas in post#4 could be used to find the transitions (direction change): Color Background Based on Alert Condition and the Parabolic SAR (PSAR) To convert them for a spreadsheet study: VTI moves below price bar (transition to upslope): =AND(ID2.SG1@4>=C4,D3>=ID2.SG1@3) VTI moves above price bar (transition to downslope): =AND(ID2.SG1@4<=D4,C3<=ID2.SG1@3) If you want a +1/-1 persistent output in the same column, e.g. cell P3: =IF(AND(ID2.SG1@4>=C4,D3>=ID2.SG1@3),1,IF(AND(ID2.SG1@4<=D4,C3<=ID2.SG1@3),-1,P4)) |