Indicators limited to 1 raised signal/alert trigger per bar

njoan

New member
Joined
Aug 26, 2019
Posts
4
Likes
0
It appears that indicators are limited to 1 'triggering' of an internal signal or alert per bar. For example, if we enable bar updates, and within onBarUpdate() or onTick() we call ctx.signal() on each tick, the signal will only actually be triggered once per bar - on the first time it's called. All subsequent calls to raise a signal are ignored for that bar, as though a flag is being set internally to limit indicators to one signal per bar. Similarly, if we set up an alert to tell us when an indicator value has touched/crossed a threshold - the alert will only trigger once per bar, despite 'Trigger Multiple' being enabled and the alert conditions being satisfied multiple times intrabar. Alerts for 'Price crosses/touches' on the other hand (an alert which is not based on a chart indicator, but fundamental price bar data) are capable of triggering multiple times intrabar.

A good example of this is if we set an alert for 'Price touches X' with 'Trigger Multiple' enabled - it will trigger multiple times intrabar if price truly touches X multiple times intrabar. If we go ahead and apply an SMA(1) study (which should be equivalent to Price) with bar updates enabled, we would expect a 'SMA(1) touches X' alert with 'Trigger Multiple' enabled to behave the same way. However, it will only trigger once and miss all other intrabar 'touches' of X.

Is this intentional, or is there a way to get around it?

Thank you for your time.
 
Last edited:
Top