I want to find ONLY the most recent ScalpertAlert and ignore any others before it. The following code plots all the ScalpertAlert in a time frame. How can I display ONLY the most recent alert and ignore others?
declare lower;
input varEnd=20;
plot ScalperAlert = fold i = 0 to varEnd
with varTest=Double.NaN
while isNan(varTest) and
!isnan(Close)
do TTM_ScalperAlert().PivotLow;
declare lower;
input varEnd=20;
plot ScalperAlert = fold i = 0 to varEnd
with varTest=Double.NaN
while isNan(varTest) and
!isnan(Close)
do TTM_ScalperAlert().PivotLow;