Doji Alert Code

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #249078 quote
    jonseddon
    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ález
    Moderator
    Master

    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
    #249092 quote
    jonseddon
    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.

    #249096 quote
    jonseddon
    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.

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 jonseddon
6 months, 2 weeks ago.

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