Chiedo gentilmente la conversione di questo indicatore Fitex.MillioN mq4

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #116693 quote
    RiccardoRiccardo
    Participant
    Senior
    //+------------------------------------------------------------------+
    //| Fitex.MillioN MODIFICATO.mq4 |
    //| |
    //+------------------------------------------------------------------+
    
    #property indicator_separate_window
    #property indicator_buffers 3
    #property indicator_color1 DodgerBlue
    #property indicator_color2 DodgerBlue
    #property strict
    #property indicator_color3 Orange
    #property indicator_level1 0
    #property indicator_levelcolor Black
    #property indicator_levelstyle STYLE_SOLID
    
    extern int period = 100;
    extern bool PopupAlerts = TRUE;
    extern bool EmailAlerts = FALSE;
    extern bool PushNotificationAlerts = FALSE;
    extern bool SoundAlerts = TRUE;
    extern string SoundFileLong = "comprar.wave";
    extern string SoundFileShort = "vender.wave";
    
    bool alarm=true;
    
    double buffer_88[];
    double buffer_92[];
    double buffer_96[];
    int alertBar,last;
    
    int OnInit() {
    SetIndexStyle(0, DRAW_NONE);
    SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 3, DodgerBlue);
    SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 3, Orange);
    IndicatorDigits(Digits + 1);
    SetIndexBuffer(0, buffer_88);
    SetIndexBuffer(1, buffer_92);
    SetIndexBuffer(2, buffer_96);
    IndicatorShortName("Fitex Million");
    SetIndexLabel(1, NULL);
    SetIndexLabel(2, NULL);
    return (0);
    }
    
    int start() {
    double ld_8;
    double ld_16;
    double ld_80;
    int li_4 = IndicatorCounted();
    double ld_32 = 0;
    double ld_40 = 0;
    double ld_unused_48 = 0;
    double ld_unused_56 = 0;
    double ld_64 = 0;
    double ld_unused_72 = 0;
    double l_low_88 = 0;
    double l_high_96 = 0;
    if (li_4 > 0) li_4--;
    int li_0 = Bars - li_4;
    for (int li_104 = 0; li_104 < li_0; li_104++) { l_high_96 = High[iHighest(NULL, 0, MODE_HIGH, period, li_104)]; l_low_88 = Low[iLowest(NULL, 0, MODE_LOW, period, li_104)]; ld_80 = (High[li_104] + Low[li_104]) / 2.0; ld_32 = 0.66 * ((ld_80 - l_low_88) / (l_high_96 - l_low_88) - 0.5) + 0.67 * ld_40; ld_32 = MathMin(MathMax(ld_32, -0.999), 0.999); buffer_88[li_104] = MathLog((ld_32 + 1.0) / (1 - ld_32)) / 2.0 + ld_64 / 2.0; ld_40 = ld_32; ld_64 = buffer_88[li_104]; } bool li_108 = TRUE; for (int li_104 = li_0 - 2; li_104 >= 0; li_104--) {
    ld_16 = buffer_88[li_104];
    ld_8 = buffer_88[li_104 + 1];
    if ((ld_16 < 0.0 && ld_8 > 0.0) || ld_16 < 0.0) li_108 = FALSE; if (alarm && li_104==0 && last != 2 && buffer_92[li_104] == 0 && Bars>alertBar)
    {
    doAlerts("Trend Down",SoundFileShort);//Alert("Fisher Trend Down on ",Period()," ",Symbol());
    alertBar = Bars;last = 2;
    }
    
    if ((ld_16 > 0.0 && ld_8 < 0.0) || ld_16 > 0.0) li_108 = TRUE;
    if (alarm && li_104==0 && last != 1 && buffer_96[li_104] == 0 && Bars>alertBar)
    {
    doAlerts("Trend UP",SoundFileLong);//Alert("Fisher Trend Up on ",Period()," ",Symbol());
    alertBar = Bars;
    last = 1;
    }
    
    if (!li_108) {
    buffer_96[li_104] = ld_16;
    buffer_92[li_104] = 0.0;
    } else {
    buffer_92[li_104] = ld_16;
    buffer_96[li_104] = 0.0;
    }
    }
    return (0);
    }
    void doAlerts(string msg,string SoundFile) {
    msg="Fitex Million "+Symbol()+": "+msg+"";
    string emailsubject="MT4 alert on acc. "+WindowExpertName()+" - Alert on "+Symbol()+"";
    if (PopupAlerts) Alert(msg);
    if (EmailAlerts) SendMail(emailsubject,msg);
    if (PushNotificationAlerts) SendNotification(msg);
    if (SoundAlerts) PlaySound(SoundFile);
    }//void doAlerts(string msg,string SoundFile) {
    
    string TFtoStr(int iPeriod) {
    if (period==0) period=Period();
    switch(period) {
    case 1 : return("M1"); break;
    case 5 : return("M5"); break;
    case 15 : return("M15"); break;
    case 30 : return("M30"); break;
    case 60 : return("H1"); break;
    case 240 : return("H4"); break;
    case 1440 : return("D1"); break;
    case 10080 : return("W1"); break;
    case 43200 : return("MN1"); break;
    default : return(DoubleToStr(period,0));
    }
    return("UNKNOWN");
    }//string TFtoStr(int period) {

     

    F-MOD.jpg F-MOD.jpg
    #116729 quote
    NicolasNicolas
    Keymaster
    Legend

    La prossima volta rispetta le regole che leggi in questa pagina: buon titolo, piccola descrizione dell’indicatore e aggiungi un’immagine. Terza o quarta volta che chiedi una conversione, dovresti saperlo ora !?

    A proposito, questo indicatore sembra essere derivato da una formula di FISHER’s Transform,  lo tradurrò al più presto.

    #116731 quote
    NicolasNicolas
    Keymaster
    Legend

    ecco il codice che ho tradotto da quel codice MT4.

    period = 100
    
    if barindex>period then 
    lhigh96 = highest[period](high)
    llow88 = lowest[period](low)
    ld80 = (High[0] + Low[0]) / 2.0
    ld32 = 0.66 * ((ld80 - llow88) / (lhigh96 - llow88) - 0.5) + 0.67 * ld40 
    ld32 = Min(Max(ld32, -0.999), 0.999) 
    buffer88 = Log((ld32 + 1.0) / (1 - ld32)) / 2.0 + ld64 / 2.0
    ld40 = ld32 
    ld64 = buffer88[0]
    
    ld16 = buffer88[0]
    ld8 = buffer88[1]
    
    li108= ((ld16 > 0.0 and ld8 < 0.0) or ld16 > 0.0) 
    if (not li108) then 
    buffer96 = ld16
    buffer92 = 0.0
     else 
    buffer92 = ld16
    buffer96 = 0.0
    endif
    endif
    
    return buffer96 coloured(255,165,0) style(histogram),buffer92 coloured(30,144,255) style(histogram)
    Fitex.MillioN-mq4.png Fitex.MillioN-mq4.png
    #116740 quote
    RiccardoRiccardo
    Participant
    Senior

    Scusa la mia Ignoranza Nicolas,  adesso guardo come fanno gli altri e la prossima volta cercherò di spiegarmi meglio

    Comunque Sempre UN Grande Grazie per quello che fai  …

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

Chiedo gentilmente la conversione di questo indicatore Fitex.MillioN mq4


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Riccardo @riccardo_lanz Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by RiccardoRiccardo
6 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 01/13/2020
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...