Crear una línea a la apertura del mes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117652 quote
    Koalas
    Participant
    New

    Buenas noches,

    Por favor, necesito ayuda a la hora de realizar un indicador. Es muy sencillo, pero no lo sé hacer y no sé donde encontrar información para poder desarrollarlo.

    Explico las características:

    • Necesito únicamente crear 4 líneas en el gráfico del Dax y que se pueda ver en todos los time frame.
    • Que la línea se cree a la apertura del semana.
    • Que la línea se cree a la apertura del mes.
    • Que la línea se cree a la apertura del trimestre.
    • Que la línea se cree a la apertura del año.

    Creo que es muy sencillo, pero soy novato y no doy con la tecla.

    Muchas gracias de antemano por la atención recibida.

    Un saludo.

    #117655 quote
    robertogozzi
    Moderator
    Master

    Ahí tienes. Debe establecer colores con las propiedades del indicador:

    IF OpenYear <> OpenYear[1] THEN
       YearOpen   = open
    ENDIF
    IF (OpenMonth <> OpenMonth[1]) AND (OpenMonth = 1 OR OpenMonth = 4 OR OpenMonth = 7 OR OpenMonth = 10) THEN
       QuarterOpen= open
    ENDIF
    IF OpenMonth <> OpenMonth[1] THEN
       MonthOpen  = open
    ENDIF
    IF OpenDayOfWeek = 1 AND (OpenDayOfWeek <> OpenDayOfWeek[1]) THEN
       WeekOpen   = open
    ENDIF
    RETURN YearOpen AS "Año",QuarterOpen AS "Trimestre",MonthOpen AS "Mes",WeekOpen AS "Semana"
    Nicolas thanked this post
    #118083 quote
    Koalas
    Participant
    New

    Muchas gracias Roberto Gozzi.

    Lo he probado y me sirve.

    Te estoy muy agradecido!!!

    #122199 quote
    Blackrider
    Participant
    New

    Hola,

    He anadido la apertura del dia actual tambien:

     

    IF OpenYear <> OpenYear[1] THEN
    YearOpen   = open
    ENDIF
    IF (OpenMonth <> OpenMonth[1]) AND (OpenMonth = 1 OR OpenMonth = 4 OR OpenMonth = 7 OR OpenMonth = 10) THEN
    QuarterOpen= open
    ENDIF
    IF OpenMonth <> OpenMonth[1] THEN
    MonthOpen  = open
    ENDIF
    IF OpenDayOfWeek = 1 AND (OpenDayOfWeek <> OpenDayOfWeek[1]) THEN
    WeekOpen   = open
    ENDIF
    
    IF OpenDay <> OpenDay[1] THEN
    DayOpen  = open
    ENDIF
    
    RETURN YearOpen AS "Año",QuarterOpen AS "Trimestre",MonthOpen AS "Mes",WeekOpen AS "Semana", DayOpen AS "Dia"
    Juan Salas thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Crear una línea a la apertura del mes


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Koalas @koalas Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Blackrider
5 years, 10 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 01/24/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...