Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 04:40:35 +0000



Post From: How to generate an alert when a study reverses direction?

[2018-10-14 17:23:37]
Xfanman1 - Posts: 320
Compare the current direction against the bar or two before. If you use [-1] to reference prior bars you can capture the change in the current bar. Just an example if your Study is ID10.SG1 you could try:

=AND(ID10.SG1>ID10.SG1[-1],ID10.SG1[-1]<ID10.SG1[-2])

This states that the current bar is above the previous bar AND the previous bar is less than the bar prior to that. This should capture the turn. You can add additional bar lookbacks if you want to make sure it wasn’t just a 1 bar change. You can also specify if you are only looking for this directional change above or below a certain level by adding something like ID10.SG1 < 20 if you only want to alert when the change happens below 20 (or whatever value you consider the bottom to be of your study)


Scott
Date Time Of Last Edit: 2018-10-14 17:27:08