INSERIRE CONTATORE CONDIZIONE

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #224107 quote
    MARAUDERMARAUDER
    Participant
    New

    ciao a tutti desidero chiedervi se fosse possibile aggiungere (ad un codice che ricerca una condizione) un contatore per sapere quante volte la condizione da me indagata è uscita nel corso di 10 anni ad esempio. ho cercato qualcosa anche sui manuali ma non ho trovato nulla grazie

    #224109 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Puoi fare un esempio di condizione da cercare?

    Quale timeframe usi?

    #224112 quote
    MARAUDERMARAUDER
    Participant
    New

    roberto ciao mi riferivo al codice che mi hai mandato l’altro giorno riguardante il fatto di trovare le candele che hanno avuto un certo range percentuale fra max e min ad esempio.

    ho seguito le tue istruzioni importando il file e tutto funziona. grazie ancora

    ora vorrei riuscire a sapere nel caso di bitcoin (a livello day da quando è nato) quante volte è comparsa la condizione del codice senza dover contare io personalmente grazie

    #224171 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo (è comunque meglio se importi il file ITF allegato):

    //DallaData = 20230101
    RangeMassimo = close * 0.09  //9%
    RangeMinimo  = close * 0.07  //7%
    IF IsLastBarUpdate THEN
       Contatore    = 0
       i            = 0
       While i < BarIndex
          IF OpenDate < DallaData THEN
             break
          endif
          IF (range[i] >= RangeMinimo) AND (range[i] <= RangeMassimo) THEN
             Contatore = Contatore + 1
          ENDIF
          i = i + 1
       Wend
    ENDIF
    RETURN Contatore AS "Contatore Range tra 7% e 9%"
    Il-Mio-Indicatore10-1.itf
    #224200 quote
    MARAUDERMARAUDER
    Participant
    New

    roberto ciao e grazie ancora se ho capito bene devo inserire al posto di DallaData (nel codice) la data esatta da cui voglio partire a contare? esatto?grazie

    #224233 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Esatto, la data da cui vuoi iniziare (se è festivo poco importa), parte dalla prima successiva.

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

INSERIRE CONTATORE CONDIZIONE


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
MARAUDER @marauder Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
2 years, 9 months ago.

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