Crear una línea a la apertura del mes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #117652 quote
    KoalasKoalas
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    x-9.jpg x-9.jpg
    #118083 quote
    KoalasKoalas
    Participant
    New

    Muchas gracias Roberto Gozzi.

    Lo he probado y me sirve.

    Te estoy muy agradecido!!!

    #122199 quote
    BlackriderBlackrider
    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.
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

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 BlackriderBlackrider
6 years, 6 months ago.

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