Create an alert from 2 conditions?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #244326 quote
    BenLaeftBenLaeft
    Participant
    New

    Bonjour,

    Voici mon début de code.

    // Définir l'indicateur Williams %R à 42 périodes
    indw = williams[42](close)
    
    // Vérifier si Williams %R passe de 0 à une valeur < -20 en 2 séances
    condition1 = williams[1] > 0 AND williams < -20
    
    // Vérifier la perte de -15 points entre J0 et J+2
    condition2 = williams[0] - williams[2] >= 15

    J’aimerais créer une alerte lorsque les 2 conditions sont remplies et transformer la courbe Williams%R sur les 2 derniers jours en “rouge gras” dans ce cas.

    Pourriez-vous m’aider ?

    Merci

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

    Buenas. He corregido algunas líneas de su código. Rara vez se cumplirán las condiciones que busca…

    // Définir l'indicateur Williams %R à 42 périodes
    indw = williams[42](close)
    
    // Vérifier si Williams %R passe de 0 à une valeur < -20 en 2 séances
    condition1 = indw[1] = 0 AND indw< -20
    
    // Vérifier la perte de -15 points entre J0 et J+2
    condition2 = indw - indw[2] >= 15
    
    if condition1 and condition2 then
    drawpoint(barindex,indw,2)coloured("orange")
    drawpoint(barindex,indw,5)coloured("orange",30)
    endif
    
    return indw as "Williams", 0 style(dottedline), -20 style(dottedline)
Viewing 2 posts - 1 through 2 (of 2 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

Create an alert from 2 conditions?


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
BenLaeft @benlaeft Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván GonzálezIván González
1 year, 6 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/25/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...