Indicador Vigia , codigo de conversion MT4 a Prorealtime

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #218832 quote
    JankarlJankarl
    Participant
    New

    Hola.

    Adjunto el codigo para la conversión.

    //+——————————————————————+
    //| Damiani_volatmeter.mq4 |
    //| Copyright © 2006, Luis Guilherme Damiani |
    //| http://www.damianifx.com.br |
    //+——————————————————————+
    #property copyright “Copyright © 2006, Luis Guilherme Damiani”
    #property link “http://www.damianifx.com.br”

    #property indicator_separate_window
    #property indicator_buffers 3
    #property indicator_color1 Silver
    #property indicator_color2 FireBrick
    #property indicator_color3 Lime
    //—- input parameters
    extern int Viscosity=13;
    extern int Sedimentation=34;
    extern double Threshold_level=1.3;
    extern bool lag_supressor=true;
    double lag_s_K=0.5;
    //—- buffers
    double thresholdBuffer[];
    double vol_m[];
    double vol_t[];
    double ind_c[];
    //+——————————————————————+
    //| Custom indicator initialization function |
    //+——————————————————————+
    int init()
    {
    //—- indicators
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,thresholdBuffer);
    SetIndexStyle(1,DRAW_SECTION);
    SetIndexBuffer(1,vol_m);
    SetIndexStyle(2,DRAW_LINE);
    SetIndexBuffer(2,vol_t);

    ArrayResize(ind_c,Bars);
    ArrayInitialize(ind_c,0.0);
    //—-
    return(0);
    }
    //+——————————————————————+
    //| Custor indicator deinitialization function |
    //+——————————————————————+
    int deinit()
    {
    //—-

    //—-
    return(0);
    }
    //+——————————————————————+
    //| Custom indicator iteration function |
    //+——————————————————————+
    int start()
    {
    double vol=0;
    int changed_bars=IndicatorCounted();
    //Comment(“ATR ratio= “+short_atr+” / “+long_atr);
    int limit=Bars-changed_bars;
    if (limit>Sedimentation+5)limit=limit-Sedimentation;
    for(int i=limit;i>=0;i–)
    {

    double sa=iATR(NULL,0,Viscosity,i);
    double s1=ind_c[i+1];
    double s3=ind_c[i+3];
    double atr=NormalizeDouble(sa,Digits);
    if(lag_supressor)
    vol= sa/iATR(NULL,0,Sedimentation,i)+lag_s_K*(s1-s3);
    else
    vol= sa/iATR(NULL,0,Sedimentation,i);
    //vol_m[i]=vol;

    double anti_thres=iStdDev(NULL,0,Viscosity,0,MODE_LWMA,PRICE_TYPICAL,i);

    anti_thres=anti_thres/
    iStdDev(NULL,0,Sedimentation,0,MODE_LWMA,PRICE_TYPICAL,i);

    double t=Threshold_level;
    t=t-anti_thres;

    if (vol>t){vol_t[i]=vol;vol_m[i]=vol;
    IndicatorShortName(“DAMIANI Signal/Noise: TRADE / ATR= “+DoubleToStr(atr,Digits)+” values:”);}
    else {vol_t[i]=vol;vol_m[i]=EMPTY_VALUE;
    IndicatorShortName(“DAMIANI Signal/Noise: DO NOT trade / ATR= “+DoubleToStr(atr,Digits)+” values:”);}
    ind_c[i]=vol;
    thresholdBuffer[i]=t;
    }
    //—-

    //—-
    return(0);
    }
    //+——–

    Este indicador muestra cuando se puede estar dentro de mercado.

    NO se puede estar dentro mientras exista la linea roja gruesa dibujada en el grafico.

    imagen-el-vigia.pdf
    #218855 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Publica solo en el idioma del foro en el que publicas. Por ejemplo, inglés solo en foros en inglés y español solo en foros en español (Lo moví del foro en inglés).

    Gracias 🙂

    #220962 quote
    JankarlJankarl
    Participant
    New

    Ok. nuevamente pido disculpas por equivocarme de foro.

    Agradezco la gran labor que desempeñas en la web.

    #221187 quote
    NicolasNicolas
    Keymaster
    Legend

    Este indicador Damiani Volameter está disponible para descargar aquí: https://www.prorealcode.com/prorealtime-indicators/damiani-volameter/

    #221246 quote
    JankarlJankarl
    Participant
    New

    Hola Nicolas.

    Muchas gracias. Eres un crack. Sin duda tu labor ayuda mucho a la difusion de Prorealtime.

Viewing 5 posts - 1 through 5 (of 5 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

Indicador Vigia , codigo de conversion MT4 a Prorealtime


ProBuilder: Indicadores y Herramientas

New Reply
Author
author-avatar
Jankarl @jankarl Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by JankarlJankarl
3 years ago.

Topic Details
Forum: ProBuilder: Indicadores y Herramientas
Language: Spanish
Started: 08/09/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...