Rilevare un gap tra il 2% e il 10% con un volume minimo di 3 volte la media

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #224114 quote
    dovakinusdovakinus
    Participant
    New

    Vorrei scrivere un codice che rilevi un gap tra il 2% e il 10% con un volume minimo di 3 volte la media, consentendo al contempo di modificare l’unità di tempo. Non voglio alcuna indicazione di acquisto o vendita. Ad esempio, vorrei essere avvisato quando LVMH ha un gap di almeno il 2% con un volume superiore a 3 volte la media”. Grazie

    #224187 quote
    dovakinusdovakinus
    Participant
    New

    persona ?

    #224196 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si, devi avere un pò di pazienza.

    Per favore dai un titolo significativo al tuo argomento. Descrivi la tua domanda o l’oggetto nel titolo. Non utilizzare titoli privi di significato come “Aiuto per la codifica” o simili.

    Grazie 🙂

    #224199 quote
    dovakinusdovakinus
    Participant
    New

    notato signore.

    #224798 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    Avg     = volume >= average[20,0](volume)
    GapUP   = open > high[1]
    GapDN   = open < low[1]
    GapSize = 0
    GapPC   = 0
    IF GapUP THEN
       GapSize = open - high[1]
       GapPC   = GapSize * 100 / high[1]
    ELSIF GapDN THEN
       GapSize = low[1] - open
       GapPC   = -(GapSize * 100 / low[1])
    ENDIF
    Signal = 0
    IF (abs(GapPC) >= 2) AND (abs(GapPC) <= 10) AND Avg THEN
       Signal = GapPC
    ENDIF
    Return Signal AS "Gap %"
    //SCREENER[Signal](GapPC AS "Gap %")

    scambia le doppie barre dei commenti tra le ultime due righe per passare da uno screener ad un indicatore e viceversa.

    #228213 quote
    dovakinusdovakinus
    Participant
    New

    Grazie mille per il codice che funziona molto bene solo per il volume è che si può mettere in relazione al giorno prima del gap e non 20 periodi.

    #228277 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo:

    GapUP   = open > high[1]
    GapDN   = open < low[1]
    GapSize = 0
    GapPC   = 0
    IF GapUP THEN
       GapSize = open - high[1]
       GapPC   = GapSize * 100 / high[1]
    ELSIF GapDN THEN
       GapSize = low[1] - open
       GapPC   = -(GapSize * 100 / low[1])
    ENDIF
    Signal = 0
    IF (abs(GapPC) >= 2) AND (abs(GapPC) <= 10) AND Volume > Volume[1] THEN
       Signal = GapPC
    ENDIF
    SCREENER[Signal](GapPC AS "Gap %")
    #228387 quote
    dovakinusdovakinus
    Participant
    New

    Grazie mille mr robertogozzi.

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

Rilevare un gap tra il 2% e il 10% con un volume minimo di 3 volte la media


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
dovakinus @dovakinus Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by dovakinusdovakinus
2 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 11/22/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...