Graficar inidcador de trade en la ventana del precio

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #247514 quote
    RAM24
    Participant
    New

    Hola a todos!

    alguien me podria ayudar con la estrategia detallada abajo, estoy tratando de reflejarlo un indicador en la ventana del precio con dos colores a la vez, es decir rojo para la zona de entrada-stoploss y verde para la zona entrada-takeprofit, puede ser en forma de vela y debe quedar reflejada cada vez que hay una señal de entrada, he tratado de ultilazar la opcion dibujar rectangulo o dibujar vela, pero no se pueden diferenciar las zonas, alguien sabria como?

    saludos!

    Lili

    ///////////

    timeframe(daily, updateonclose)

    entrycondition1 = close < average[65](close)

    TimeFrame(default)

    entrydaytime = dayofweek = 2 and time = 090000

    exitdaytime = dayofweek = 3 and time = 173000

    entrycondition2 = dlow(0) > dlow(1) or dhigh(0) > dhigh(1)

    if entrydaytime and entrycondition1 and entrycondition2 and not onmarket then

    buy 1 contract at market

    set stop %loss 2

    endif

    if exitdaytime then

    sell at market

    endif

    #247521 quote
    robertogozzi
    Moderator
    Master
    Ahí está:
    DEFPARAM DrawOnLastBarOnly = true
    timeframe(daily, updateonclose)
    ONCE HH = high*1.05
    ONCE LL = low*0.95
    HH      = max(HH,high*1.05)
    LL      = min(LL,low*0.95)
    entrycondition1 = close < average[65](close)
    TimeFrame(default)
    ONCE AtMarket = 0
    entrydaytime = dayofweek = 2 and time = 090000
    exitdaytime  = dayofweek = 3 and time = 173000
    entrycondition2 = dlow(0) > dlow(1) or dhigh(0) > dhigh(1)
    if entrydaytime and entrycondition1 and entrycondition2 and not AtMarket then
       AtMarket   = 1
       EntryPrice = close
       EntryBar   = BarIndex
    endif
    if exitdaytime then
       AtMarket   = 0
    endif
    IF AtMarket THEN
       DrawRectangle(EntryBar,EntryPrice,BarIndex,HH) coloured("Green",50) fillcolor("Green",50)
       DrawRectangle(EntryBar,EntryPrice,BarIndex,LL) coloured("Red",50)   fillcolor("Red",50)
    ENDIF
    RETURN
    Iván González thanked this post
    #247546 quote
    RAM24
    Participant
    New
    muchas gracias
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Graficar inidcador de trade en la ventana del precio


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
RAM24 @ram24 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by RAM24
8 months, 2 weeks ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 05/22/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...