Belkayate Timing indicator

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Belkayate Timing indicator

Postby Shadow77 » Thu Feb 25, 2010 2:06 pm

Hello,
i found the code MT4 of the Timing indicator of belkayate, could you please help me to translate it for marketscope.

Thanks in advance.

//////////////////////////////////////////////////////////////////////////////
#property indicator_separate_window

#property indicator_levelcolor Indigo
#property indicator_levelstyle 0
#property indicator_buffers 4
#property indicator_color1 Black
#property indicator_color2 Black
#property indicator_color3 Black
#property indicator_color4 Black
#property indicator_level1 8.0
#property indicator_level2 6.0
#property indicator_level3 -6.0
#property indicator_level4 -8.0

extern int NumBars = 5;
extern int TotalBars = 180;
double g_ibuf_80[];
double g_ibuf_84[];
double g_ibuf_88[];
double g_ibuf_92[];

int init() {
SetIndexStyle(0, DRAW_NONE);
SetIndexBuffer(0, g_ibuf_80);
SetIndexStyle(1, DRAW_NONE);
SetIndexBuffer(1, g_ibuf_92);
SetIndexStyle(2, DRAW_NONE);
SetIndexBuffer(2, g_ibuf_84);
SetIndexStyle(3, DRAW_NONE);
SetIndexBuffer(3, g_ibuf_88);
IndicatorShortName(" Timing ");
return (0);
}

int deinit() {
Comment("");
return (0);
}

int start() {
double ld_12;
double ld_20;
double ld_28;
string l_name_44;
string l_name_52;

//int TotalBars = IndicatorCounted();
int TotalBars = WindowBarsPerChart();



string ls_0 = " Timing ";
int li_8 = WindowFind(ls_0);
//for (int l_index_40 = 0; l_index_40 < Bars; l_index_40++) {
for (int l_index_40 = 0; l_index_40 < TotalBars; l_index_40++) {
ld_12 = 0;
for (int l_index_36 = l_index_40; l_index_36 < NumBars + l_index_40; l_index_36++) ld_12 += (High[l_index_36] + Low[l_index_36]) / 2.0;
ld_20 = ld_12 / NumBars;
ld_12 = 0;
for (l_index_36 = l_index_40; l_index_36 < NumBars + l_index_40; l_index_36++) ld_12 += High[l_index_36] - Low[l_index_36];
ld_28 = 0.2 * (ld_12 / NumBars);
g_ibuf_80[l_index_40] = (High[l_index_40] - ld_20) / ld_28;
g_ibuf_92[l_index_40] = (Low[l_index_40] - ld_20) / ld_28;
g_ibuf_84[l_index_40] = (Open[l_index_40] - ld_20) / ld_28;
g_ibuf_88[l_index_40] = (Close[l_index_40] - ld_20) / ld_28;
}
Sleep(1000);
ObjectsDeleteAll(li_8);

//for (l_index_36 = 0; l_index_36 <= Bars; l_index_36++) {
for (l_index_36 = 0; l_index_36 <= TotalBars; l_index_36++) {
l_name_44 = "TimingHL" + l_index_36;
ObjectCreate(l_name_44, OBJ_TREND, li_8, Time[l_index_36], g_ibuf_80[l_index_36], Time[l_index_36], g_ibuf_92[l_index_36]);
ObjectSet(l_name_44, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(l_name_44, OBJPROP_RAY, FALSE);
ObjectSet(l_name_44, OBJPROP_WIDTH, 1);
l_name_52 = "TimingOC" + l_index_36;
ObjectCreate(l_name_52, OBJ_TREND, li_8, Time[l_index_36], g_ibuf_84[l_index_36], Time[l_index_36], g_ibuf_88[l_index_36]);
ObjectSet(l_name_52, OBJPROP_STYLE, STYLE_SOLID);
ObjectSet(l_name_52, OBJPROP_RAY, FALSE);
ObjectSet(l_name_52, OBJPROP_WIDTH, 3);
if (Open[l_index_36] <= Close[l_index_36]) {
ObjectSet(l_name_44, OBJPROP_COLOR, Green);
ObjectSet(l_name_52, OBJPROP_COLOR, Green);
} else {
ObjectSet(l_name_44, OBJPROP_COLOR, Red);
ObjectSet(l_name_52, OBJPROP_COLOR, Red);
}
}

return (0);
}
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am

Re: Belkayate Timing indicator

Postby Nikolay.Gekht » Fri Feb 26, 2010 4:58 pm

The indicator requires an ability to create free lines. It will be possible in a few weeks, so I'll prepare the indicator and will publish it when the new version of Marketscope will be released (estimated the middle-the end of March).
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Belkayate Timing indicator

Postby Shadow77 » Mon Mar 01, 2010 4:38 am

Thank you in advance
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am

Re: Belkayate Timing indicator

Postby Shadow77 » Tue Apr 13, 2010 3:50 am

Any chance to have this indicator as the new marketscope has been release ?
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am

Re: Belkayate Timing indicator

Postby Nikolay.Gekht » Tue Apr 13, 2010 9:18 am

Yes, surely. I have started to do all delayed requests.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Belkayate Timing indicator

Postby Nikolay.Gekht » Tue Apr 20, 2010 2:48 pm

Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Belkayate Timing indicator

Postby Shadow77 » Wed Apr 21, 2010 4:08 am

Thanks for your help... i appreciate
Shadow77
 
Posts: 13
Joined: Tue Feb 23, 2010 8:09 am


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Google [Bot] and 12 guests