This is an extension of the previous post from the series as the Alerts are now quite powerful feature, it did not fit into the previous post.
Alert on various events - monitoring of custom variables
We can monitor any global variable against any value we can calculate at the time of the pressing of the hotkey.
For example, we can
Monitor if the symbol has reached its ATR
We have the $MYATR variable read from the ATR indicator as described in the previous posts in the chart update script.
$MYATR=GetStudyVal("myatr");
Where we need also an update script that calculates is the difference between LOD and HOD, which defines today’s range.
$TDRANGE=$MONTAGE.Hi-$MONTAGE.Lo;
If our ATR is 4.89, we can create an alert that will alert us if $TDRANGE is greater than 4.89 like this.
Which would give us an alert like this
That would be just too exhausting to read the ATR and putting this alert together manually.
Automating the alerts creation
Keep reading with a 7-day free trial
Subscribe to Peter’s Substack to keep reading this post and get 7 days of free access to the full post archives.