ADX/DMI modificado

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28813 quote
    Jorge Ordaz ArusJorge Ordaz Arus
    Participant
    New

    Buenas, en Ninjatrader tenia un indicador modificado (ADX +DI -DI) con el grafico en barras negras y cuando se daba el cruce de +DI/-DI cambiaba el color de la barra siguiente en verde o rojoa segun señal para corto o largo. Ahora que me pasado a PRT quiero hacer lo mismo pero no lo consigo ya que no encuentro la instruccion que me cambia color de la barra en el presio. solo me cambia en el mismo indicador. Me puede ayudar. gracias.

     

    Este es la parte que cambiaba color barra en Ninja:

     

    ————————————————————-

    DiPlus.Set(diPlus); DiMinus.Set(diMinus);
    if (CrossAbove(DM(8).DiPlus, DM(8).DiMinus,1))
    {
    BarColor = Color.Green; PlaySound(“Alert4.wav”);
    }
    if (CrossAbove(DM(8).DiMinus, DM(8).DiPlus,1))
    {
    BarColor = Color.Red; PlaySound(“Alert4.wav”);

     

    Saludos y gracias

    #29716 quote
    Jorge Ordaz ArusJorge Ordaz Arus
    Participant
    New

    Me contesto a mi mismo por si a alguien le interesa. Asi es el codigo:

    //señal +DI -DI
    
    a=DIplus[8](close)
    b=DIminus[8](close)
    //Cambia color vela
    
    if a CROSSES OVER b then
    DRAWBARCHART(open,high,low,close) COLOURED(0,255,0)
    endif
    
    if a CROSSES UNDER b then
    DRAWBARCHART(open,high,low,close) COLOURED(255,0,0)
    
    endif
    return a as "DIplus", b as "DIminus"
    bolsatrilera and Nicolas 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

ADX/DMI modificado


ProBuilder: Indicadores y Herramientas

New Reply
Author
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by Jorge Ordaz ArusJorge Ordaz Arus
9 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 03/16/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...