Alert sound with signal

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #169136 quote
    cavineetcavineet
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    cavineetcavineet
    Participant
    Average

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

    #169220 quote
    cavineetcavineet
    Participant
    Average

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

    #169236 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    cavineetcavineet
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 cavineetcavineet
5 years, 5 months ago.

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