Support Board
Date/Time: Tue, 26 Nov 2024 09:47:05 +0000
Post From: Breaking up Halftrend study to use in a Simple Alert
[2023-12-16 15:22:41] |
Sawtooth - Posts: 4120 |
I'd like to create a simple alert that references each condition separately for the entire duration one of them is valid.
Since the colors alternate at every arrow, use SG2 and SG3 in a formula like this in the Spreadsheet Formula study's Formula field:=IF(ID2.SG2>0,1,IF(ID2.SG3>0,-1,ID3.SG1[-1])) where ID2 is the Halftrend study. This formula creates a persistent value each time the arrows alternate. It will return 1 for an 'up' condition, and a -1 for a 'down' condition, for the duration of each condition. You can then use the Spreadsheet Formula's output to color price bars, etc., using the Color Bar Based On Alert Condition study. |