What code line should I add to the attached strategy to get the alert sound wheneven there is change in signal
Indicators cannot set alarms. They can only RETURN data and those data can be used by manually setting alerts with the built-in ALARM tool.
Change the RETURN line this way:
RETURN lastsig <> lastsig[1] as "Signal Change"
then set an alert with the ALERT tool (bell) on the PRT toolbar (pic X), the set it to activate whenever the RETURNed value is 1 (pic Y).
Thank you so much Robert. It worked. you are awesome
One more thing. Do we have scanner fo signals of this strategy. This strategy was developed by Nicolas
Here is the screener:
//PRC_Pivot Reversal Strategy indicator - 14.02.2019 - Nicolas @ www.prorealcode.com
//
//DEFPARAM CalculateOnLastBars = 1000
// --- settings
leftp = 4
rightp = 2
//
period=max(leftp,rightp)
hh = highest[period](high)
ll = lowest[period](low)
if hh<>hh[1] then
hhbar=barindex
hhprice=high
endif
if ll<>ll[1] then
llbar=barindex
llprice=low
endif
if barindex-hhbar=rightp then
//drawtext("•",hhbar,hhprice) coloured(168,168,168)
top=hhprice
endif
if barindex-llbar=rightp then
//drawtext("•",llbar,llprice) coloured(168,168,168)
bottom=llprice
endif
if high crosses over top and lastsig<=0 then
//drawarrowup(barindex,low-atr/2) coloured(30,144,255)
lastsig=1
endif
if low crosses under bottom and lastsig>=0 then
//drawarrowdown(barindex,high+atr/2) coloured(255,48,48)
lastsig=-1
endif
SCREENER[lastsig <> lastsig[1]]
Thanks Robert. Really appreciate this.
Regards
Vineet