Colorbetween fallo dibujo

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #247171 quote
    MiguelAngelMartinezMiguelAngelMartinez
    Participant
    Junior

    Buenas tardes, estoy intentado dibujar cuando el precio este por encima de ema20 que de banda up a banda down se me dibuja en verde y si el precio esta por debajo de ema20 me dibuje de banda up a banda down en rojo pero lo estoy intentando dibujar con este codigo y me da fallo tanto en la posicion que se dibuja tanto en que se estan dibujando los dos a la vez. Un saludo

    defparam drawonlastbaronly = true
    //rectangulo
    psarw= SAR[0.02,0.02,0.2]
    devw = 2 //quantity of deviation
    avgw = ExponentialAverage[20](close) //mean
    Bbupw = avgw+std[20](close)*devw //Bollinger Up value
    Bbdownw = avgw-std[20](close)*devw //Bollinger Down value
    EMA20= ExponentialAverage[20](close) 
    IF close > ema20 then 
    colorbetween(Bbupw,Bbdownw,"GREEN",20)
    ENDIF
    IF close < ema20 then
    colorbetween(Bbupw,Bbdownw,"RED",20)
    ENDIF
    
    RETURN 
    
    
    
    #247173 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Buenas tardes,

    defparam drawonlastbaronly = true
    //rectangulo
    //psarw= SAR[0.02,0.02,0.2]
    devw = 2 //quantity of deviation
    avgw = ExponentialAverage[20](close) //mean
    Bbupw = avgw+std[20](close)*devw //Bollinger Up value
    Bbdownw = avgw-std[20](close)*devw //Bollinger Down value
    EMA20= ExponentialAverage[20](close)
    IF close > ema20 then
    r=0
    g=255
    ENDIF
    IF close < ema20 then
    r=255
    g=0
    ENDIF
    
    colorbetween(Bbupw,Bbdownw,r,g,0,20)
    
    RETURN
    Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Colorbetween fallo dibujo


ProBuilder: Indicadores y Herramientas

New Reply
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JC_BywanJC_Bywan
1 year, 4 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 05/15/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...