VOLUMI SETTIMANALI DAL LUNEDì AL VENERDì

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #199165 quote
    byT77byT77
    Participant
    New

    Buongiorno a tutti,

    Chiedo cortesemente il vostro supporto.

    Starei sviluppando un indicatore sui Volumi.

    Vorrei che prenda in considerazione solo i volumi settimanali escludendo le domeniche.

    Sareste così gentili da indicarmi il codice da inserire?

    Grazie mille

    #199166 quote
    byT77byT77
    Participant
    New

    Ho generato così il codice, spero sia esatto.

    Period = 250

    FOR i = 0 To (Period – 1)
    IF OpenDayOfWeek => 1 and OpenDayOfWeek <= 5 then
    SVL1 = (Codice con Volume * n(period))
    SVL2 = (Codice con Volume * n(period))
    endif
    next

    #199169 quote
    byT77byT77
    Participant
    New

    Ho corretto.

     

    FOR i = 0 To 5
    IF OpenDayOfWeek => 1 and OpenDayOfWeek <= 5 then
    SVL1 = (Codice con Volume * n(period))
    SVL2 = (Codice con Volume * n(period))
    endif
    next

    #199204 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non c’è bisogno del ciclo FOR, in quanto l’indicatore parte dalle unità che hai sul grafico (ad esempio 500), oltre ad un certo numero in più precaricato, ed i giorni li identifichi mentre passano, giorno per giorno; devi solo evitare la Domenica (OpenDayOfWeek = 0):

    ONCE SVL1 = 0
    ONCE SVL2 = 0
    IF OpenDayOfWeek <> 0 THEN
       SVL1 = SVL1 + (Codice con Volume * n(period))
       SVL2 = SVL2 + (Codice con Volume * n(period))
    ENDIF
    #199280 quote
    byT77byT77
    Participant
    New

    Grazie mille. Gentile come sempre.

    Correggo subito.

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

VOLUMI SETTIMANALI DAL LUNEDì AL VENERDì


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
byT77 @byt77 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by byT77byT77
4 years ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 08/17/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...