Willhehunt
New member
I have this line in a study. Trying to determine when the current bar has closed above or below the prior bar. The aggregation function will only return day. Any help would be appreciated. Unfortunately scripting is not my strong suit and I can't find any examples of putting prior close value in a variable. This alerts when there is a new bar but can't seem to determine the direction.
Alert(close(-1) < close(), "Bar Down!", Alert.bar, Sound.Chimes);
Alert(close(-1) < close(), "Bar Down!", Alert.bar, Sound.Chimes);