VELO CENTRATA – Translating mq4 code
Forums › ProRealTime English forum › ProBuilder support › VELO CENTRATA – Translating mq4 code
- This topic has 4 replies, 2 voices, and was last updated 2 years ago by Hatsune39.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
02/18/2022 at 12:22 PM #188459
Hi there!
First of all, thank you for the support you gave me earlier!
I found this indicator for metatrader, I managed to extract the code but it looks like it’s written with a different language, so it cannot be used with ProRealTime
Is there a way to translate this? Thanks!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687#property indicator_separate_window#property indicator_level1 0#property indicator_buffers 1#property indicator_color1 Yellowextern int DurataCiclo = 5;extern int MediaVelo = 2;extern int Alert = True;double gda_96[2000];double gda_100[2000];double gda_104[2000];double g_ibuf_108[];int g_bars_112 = 1900;int g_bars_116 = 0;int init() {SetIndexStyle(0, DRAW_LINE);SetIndexBuffer(0, g_ibuf_108);string ls_0 = "Target(" + DurataCiclo + ")";IndicatorShortName(ls_0);SetIndexLabel(0, ls_0);return (0);}int deinit() {ObjectsDeleteAll();Comment("");return (0);}int start() {int ind_counted_4 = 0;//IndicatorCounted();int li_8 = DurataCiclo / 1.6180339;int li_12 = MediaVelo;int li_16 = li_8 / 1.6180339;int li_20 = li_12 / 1.6180339;int barre = Bars;if (barre <= li_8) return (0);if (barre < g_bars_112) g_bars_116 = barre;else g_bars_116 = g_bars_112;int index_0 = barre - DurataCiclo - 1;if (ind_counted_4 >= li_8) index_0 = barre - ind_counted_4 - 1;if (index_0 >= g_bars_116) index_0 = g_bars_116 - li_8 - 1;while (index_0 >= 0) {gda_96[index_0 + li_16] = Open[index_0];index_0--;}for (index_0 = 0; index_0 <= li_16; index_0++) gda_96[index_0] = gda_96[li_16];index_0 = barre - li_8 - 1;if (ind_counted_4 >= li_8) index_0 = barre - ind_counted_4 - 1;if (index_0 >= g_bars_116) index_0 = g_bars_116 - li_8 - 1;while (index_0 >= 0) {gda_100[index_0] = f0_0(gda_96, li_8, index_0);index_0--;}index_0 = barre - li_12 - 1;if (ind_counted_4 >= li_12) index_0 = barre - ind_counted_4 - 1;if (index_0 >= g_bars_116) index_0 = g_bars_116 - li_12 - 1;while (index_0 >= 0) {gda_104[index_0] = gda_100[index_0] - (gda_100[index_0 + 1]);index_0--;}for (index_0 = 0; index_0 <= li_20; index_0++) gda_104[index_0] = gda_104[li_20];index_0 = barre - li_12 - 1;if (ind_counted_4 >= li_12) index_0 = barre - ind_counted_4 - 1;if (index_0 >= g_bars_116) index_0 = g_bars_116 - li_12 - 1;while (index_0 >= 0) {g_ibuf_108[index_0] = f0_0(gda_104, li_12, index_0);index_0--;}return (0);}double f0_0(double ada_0[2000], int ai_4, int ai_8) {double ld_ret_12;for (int li_20 = ai_8 + 0; li_20 < ai_8 + ai_4; li_20++) ld_ret_12 += ada_0[li_20];ld_ret_12 /= ai_4;ld_ret_12 *= 800;return (ld_ret_12);}02/18/2022 at 1:49 PM #18846602/18/2022 at 2:03 PM #188467Please provide name of the indicator and pictures in your next message, that fasten the process of the code translation.
Hi,
I can give the file itself if it’s better to work on
02/22/2022 at 12:19 PM #18865203/07/2022 at 3:15 PM #189528 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
Find exclusive trading pro-tools on
Similar topics: