Alert sound with signal

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #169136 quote
    cavineet
    Participant
    Average

    What code line should I add to the attached strategy to get the alert sound wheneven there is change in signal

    PRC_Pivot-Reversal-Strategy.itf
    #169147 quote
    robertogozzi
    Moderator
    Master

    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).

    Nicolas thanked this post
    x-9.jpg x-9.jpg y.jpg y.jpg
    #169214 quote
    cavineet
    Participant
    Average

    Thank you so much Robert. It worked. you are awesome

    #169220 quote
    cavineet
    Participant
    Average

    One more thing. Do we have scanner  fo signals of this strategy. This strategy was developed by Nicolas

    #169236 quote
    robertogozzi
    Moderator
    Master

    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]]
    PRC_Pivot-Reversal-screener.itf
    #169295 quote
    cavineet
    Participant
    Average

    Thanks Robert. Really appreciate this.

     

    Regards

    Vineet

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Alert sound with signal


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
cavineet @cavineet Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by cavineet
4 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 05/08/2021
Status: Active
Attachments: 4 files
Logo Logo
Loading...