Fermeture jour J au dessus du bollinger

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37195 quote
    timal dude
    Participant
    Junior

    Bonjour,

    Je suis novice dans la programmation screener et  j’aurais besoin de votre aide pour corriger des aberrations de résultats.

    Je souhaite créer un screener qui me donne le breakouts du bollinger(20) par le Close du jour (à la fermeture du marché) (voire 2 ou 3 jours max)

    Mais je suis confronté à des résultats très loin de mes attentes (voir attachement)

    Total par exemple (attachement) n est ni en sur achat (RSI>70) ni en fermeture au dessus du bollinger (ou donchian…) depuis decembre 2016

     

    Comment faire?

    Cordialement

    SCREENER (près « close »)

    //indicateur
    myrsi = RSI(14)
    mybollinger = BollingerUp[20](close)
    
    //bullish trend
    EMA50 = ExponentialAverage[50](close)
    EMA200 = ExponentialAverage[200](close)
    bullish = close>EMA50 and close>EMA200 and EMA50>EMA200
    C1 = close>open
    C2 = myrsi>70
    C3 = close> mybollinger
    C4 = EMA50>EMA200
    
    Allconditions = bullish and myrsi and mybollinger
    
    SCREENER (allconditions and c1 and C2 and C3 and C4)
    Screen-Shot-2017-06-01-at-12.31.30.png Screen-Shot-2017-06-01-at-12.31.30.png
    #37220 quote
    Nicolas
    Keymaster
    Master

    A la ligne 2, la définition de ton RSI est mal formatée, la période s’écrit entre crochets et non entre paranthèses, je suppose que tu le sais, ça doit être une faute de frappe ! 😆

    myrsi = RSI[14]

    Je n’ai pas testé pour le reste, mais tu devrais commencer par ça pour voir si les résultats te conviennent finalement.

    #37224 quote
    timal dude
    Participant
    Junior

    Merci pour ta réponse, j ai effectivement corrigé par des crochets mais les résultats diffèrent peu.

    Je ne sais pas pourquoi le screener me donne des résultats qui ne remplissent pas toutes les conditions. Par exemple sur la photo (attachement) , les conditions ne sont plus remplies depuis le 2 jan 2107; à savoir surachat ET fermeture du dernier candle(Jour) au dessus du bollinger.

    Merci pour ton aide précieuse.

    Screen-Shot-2017-06-01-at-15.29.21.png Screen-Shot-2017-06-01-at-15.29.21.png
    #37247 quote
    Nicolas
    Keymaster
    Master

    Ci-dessous une rapide correction, je n’ai pas vraiment testé, mais il y a à la fois des tests redondants dans le code et des conditions qui ne servent à rien et qui induisent en erreur dans “Allconditions”:

    //indicateur
    myrsi = RSI[14]
    mybollinger = BollingerUp[20](close)
     
    //bullish trend
    EMA50 = ExponentialAverage[50](close)
    EMA200 = ExponentialAverage[200](close)
    bullish = close>EMA50 and close>EMA200 
    C1 = close>open
    C2 = myrsi>70
    C3 = close> mybollinger
    C4 = EMA50>EMA200
     
    Allconditions = bullish 
     
    SCREENER (allconditions and c1 and C2 and C3 and C4)
    screener-bullish-trend.png screener-bullish-trend.png
    #233526 quote
    timal dude
    Participant
    Junior

    Bonjour Nicolas,

    J ai un message d erreur pour ce screener. pourrais tu me le cooriger? je n arrive pas à voir ce qui ne va pas? Merci

    // ProBuilder script combining fundamental analysis, advanced technical indicators, sentiment analysis, and macroeconomic factors

    // Define fundamental analysis variables
    currentEarningsGrowth = (close – close[3]) / close[3] * 100
    annualEarningsGrowth = (close – close[4]) / close[4] * 100
    revenueGrowth = (close – close[6]) / close[6] * 100 // Proxy for revenue growth
    profitMargins = (close – close[8]) / close[8] * 100 // Proxy for profit margins

    // Valuation metrics (proxies)
    peRatio = close / average[5](close)
    pbRatio = close / average[20](close)
    pegRatio = peRatio / annualEarningsGrowth

    // Define trading volume
    volumeAverage = average[20](volume)

    // Define moving averages
    shortMA = average[50](close)
    longMA = average[200](close)

    // Define RSI
    rsiValue = RSI[14](close)

    // Define MACD properly
    macdLine = MACDLine[12, 26, 9](close)
    signalLine = MACDSignal[12, 26, 9](close)
    macdHist = macdLine – signalLine

    // Define ADX for trend strength
    adxValue = ADX[14](high, low, close)

    // Define Bollinger Bands for volatility
    upperBB = BollingerUpper[20, 2](close)
    lowerBB = BollingerLower[20, 2](close)
    volatility = upperBB – lowerBB

    // Define OBV (On-Balance Volume)
    obvValue = OBV(close, volume)

    // Define Accumulation/Distribution Line
    accDistValue = AccDist(high, low, close, volume)

    // Define Ichimoku Cloud components
    conversionLine = IchimokuTenkanSen[9](close)
    baseLine = IchimokuKijunSen[26](close)
    spanA = IchimokuSenkouSpanA[52](close)
    spanB = IchimokuSenkouSpanB[52](close)
    laggingSpan = IchimokuChikouSpan[26](close)

    // Sentiment analysis (placeholders for actual sentiment data)
    newsSentiment = 1 // Placeholder, 1 for positive sentiment
    socialSentiment = 1 // Placeholder, 1 for positive sentiment

    // Macroeconomic variables (placeholders for actual data)
    sectorRotation = 1 // Placeholder, 1 for favorable sector
    geopoliticalStability = 1 // Placeholder, 1 for stable conditions

    // Define conditions
    // Fundamental conditions
    fundamentalCondition = currentEarningsGrowth > 25 and
    annualEarningsGrowth > 25 and
    revenueGrowth > 15 and
    profitMargins > 10 and
    peRatio < 20 and
    pbRatio < 3 and
    pegRatio < 1.5

    // Technical analysis conditions
    technicalCondition = shortMA > longMA and
    rsiValue > 30 and rsiValue < 70 and
    macdHist > 0 and
    adxValue > 20 and
    close > upperBB and
    obvValue > average[20](obvValue) and
    accDistValue > average[20](accDistValue) and
    conversionLine > baseLine and
    spanA > spanB and
    laggingSpan > close

    // Sentiment conditions
    sentimentCondition = newsSentiment > 0 and
    socialSentiment > 0

    // Macroeconomic conditions
    macroCondition = sectorRotation > 0 and
    geopoliticalStability > 0

    // Combine all conditions
    combinedCondition = fundamentalCondition and
    technicalCondition and
    sentimentCondition and
    macroCondition

    // Return screener result
    SCREENER[combinedCondition](“Buy”)

    #233556 quote
    robertogozzi
    Moderator
    Master

    @timal dude

    Ne doublez pas les messages. Posez votre question une seule fois et dans un seul forum. Tous les messages doubles seront supprimés de toute façon, donc poster plusieurs fois la même question vous fera perdre votre propre temps et ne vous donnera pas de réponse plus rapidement. La double publication crée juste de la confusion dans les forums.

    Merci 🙂

    Je t’ai répondu dans l’autre sujet ouvert.

    #233560 quote
    timal dude
    Participant
    Junior

    Bien reçu, je l ai posté dans le bon forum suite à votre email.

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

Fermeture jour J au dessus du bollinger


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
timal dude @ray11961 Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by timal dude
1 year, 8 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 06/01/2017
Status: Active
Attachments: 3 files
Logo Logo
Loading...