Doji Alert Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #249078 quote
    jonseddonjonseddon
    Participant
    New

    Hi – I am completely new to programming and I have a very simple request.  I am trying to write code that will create an alert when a doji candle, on a given timeframe, is closed.  Let’s say the criterium is body <= 5% of the range.    Would be very grateful if anyone can help.  Thanks.

    #249079 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Hi! here you have the code.

    body=abs(open-close)
    doji=body<=range*0.05
    
    return doji
    

    Next step, configure an alert.

    robertogozzi thanked this post
    2025-07-24_15-40.png 2025-07-24_15-40.png
    #249092 quote
    jonseddonjonseddon
    Participant
    New

    Hi Iván – thank you very much for your help with this.  I’ve loaded the code ok as a new indicator.  I’ve set up an Alarm which I’ve configured to go off each time.  I get an alarm notification when I hit Create/Modify Alerts but non when qualifying dojis form.   Just wondered if you have any advice.  I have attached the Alarm setting.  Many thanks.

    Screenshot-2025-07-25-at-11.06.12.png Screenshot-2025-07-25-at-11.06.12.png
    #249096 quote
    jonseddonjonseddon
    Participant
    New

    Please ignore my last message it’s now working fine, I had the alert set incorrectly.  Thanks again for your help!

Viewing 4 posts - 1 through 4 (of 4 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

Doji Alert Code


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
jonseddon @jonseddon Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by jonseddonjonseddon
1 year, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/24/2025
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...