How convert From Amibroker to PRT?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #48882 quote
    mcostamcosta
    Participant
    Average

    Hello

    I need help to convert this Amibroker Indicator code to PRT code.

    Could any expert help?

    #property indicator_separate_window
    #property indicator_minimum -100.0
    #property indicator_maximum 100.0
    #property indicator_levelcolor Red
    #property indicator_width1 2
    #property indicator_level1 80.0
    #property indicator_level2 -80.0

    extern string ModeTravail = “Acheter à -100% et Vendre à 100%”;
    extern string TradeMode = “Choisir votre Mode de Trading : “;
    extern bool Scalping = TRUE;
    extern string IndColor = “Choisir La Couleur Indicateur : “;
    extern color Couleur = Blue;
    double G_ibuf_108[];
    double G_ibuf_112[];
    double G_ibuf_116[];
    double Gd_120;
    double Gd_128;
    double Gd_136;
    int Gi_144 = 5;
    int Gi_148;
    int Gi_152;
    int G_period_156;

    // E37F0136AA3FFAF149B351F6A4C948E9
    int init() {
    IndicatorBuffers(3);
    SetIndexStyle(0, DRAW_LINE, EMPTY, 2, Couleur);
    SetIndexBuffer(0, G_ibuf_108);
    SetIndexBuffer(1, G_ibuf_116);
    SetIndexBuffer(2, G_ibuf_112);
    IndicatorShortName(“Vostro © 2012 ForexMT4Systems      “);
    return (0);
    }

    // 52D46093050F38C27267BCE42543EF60
    int deinit() {
    return (0);
    }

    // EA2B2676C28C0DB26D39331A336C6B92
    int start() {
    Comment(“Download more: Www.ForexWinners.Net”);
    if (Year() >= 2020) return (0);
    if (Scalping == TRUE) G_period_156 = 100;
    else G_period_156 = 300;
    for (Gi_152 = 0; Gi_152 < Bars; Gi_152++) {
    Gd_120 = 0;
    for (Gi_148 = Gi_152; Gi_148 < Gi_144 + Gi_152; Gi_148++) Gd_120 += (High[Gi_148] + Low[Gi_148]) / 2.0;
    Gd_128 = Gd_120 / Gi_144;
    Gd_120 = 0;
    for (Gi_148 = Gi_152; Gi_148 < Gi_144 + Gi_152; Gi_148++) Gd_120 += High[Gi_148] – Low[Gi_148];
    Gd_136 = 0.2 * (Gd_120 / Gi_144);
    G_ibuf_116[Gi_152] = (Low[Gi_152] – Gd_128) / Gd_136;
    G_ibuf_112[Gi_152] = (High[Gi_152] – Gd_128) / Gd_136;
    if (G_ibuf_112[Gi_152] > 8.0 && High[Gi_152] > iMA(NULL, 0, G_period_156, 0, MODE_LWMA, PRICE_MEDIAN, Gi_152)) G_ibuf_108[Gi_152] = 90.0;
    else {
    if (G_ibuf_116[Gi_152] < -8.0 && Low[Gi_152] < iMA(NULL, 0, G_period_156, 0, MODE_LWMA, PRICE_MEDIAN, Gi_152)) G_ibuf_108[Gi_152] = -90.0;
    else G_ibuf_108[Gi_152] = 0.0;
    }
    if (G_ibuf_112[Gi_152] > 8.0 && G_ibuf_112[Gi_152 – 1] > 8.0) G_ibuf_108[Gi_152] = 0;
    if (G_ibuf_112[Gi_152] > 8.0 && G_ibuf_112[Gi_152 – 1] > 8.0 && G_ibuf_112[Gi_152 – 2] > 8.0) G_ibuf_108[Gi_152] = 0;
    if (G_ibuf_116[Gi_152] < -8.0 && G_ibuf_116[Gi_152 – 1] < -8.0) G_ibuf_108[Gi_152] = 0;
    if (G_ibuf_116[Gi_152] < -8.0 && G_ibuf_116[Gi_152 – 1] < -8.0 && G_ibuf_116[Gi_152 – 2] < -8.0) G_ibuf_108[Gi_152] = 0;
    }
    return (0);
    }

    #48885 quote
    NicolasNicolas
    Keymaster
    Legend

    Hi, this is not an Amibroker code but a decompiled Metatrader 4 one.

    Please upload the .mq4 file and add at least a screenshot of the indicator to know how it looks like. I’ll start from there, thank you.

    #48892 quote
    mcostamcosta
    Participant
    Average

    Hello Nicholas,

    Thanks for quick reply, the files are in attachment.

    Mcosta

    vst.jpg vst.jpg vst.mq4
    #48909 quote
    NicolasNicolas
    Keymaster
    Legend

    I converted the indicator from MT4 to prorealtime code, you can download it now from the library : VOSTRO indicator 

    #48956 quote
    mcostamcosta
    Participant
    Average

    Thanks very much Nicholas!

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

How convert From Amibroker to PRT?


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
mcosta @mcosta Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by mcostamcosta
8 years, 11 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 10/10/2017
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...