TRANSLATE MLQ TO LUA (TRUE STOCHASTIC)

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

TRANSLATE MLQ TO LUA (TRUE STOCHASTIC)

Postby piptopia » Fri Aug 27, 2010 1:13 pm

#property indicator_separate_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 White
#property indicator_color3 Blue
#property indicator_color4 White
#property indicator_color5 Blue
#property indicator_color6 Blue
#property indicator_color7 Black
#property indicator_color8 Black
#property indicator_level1 25
#property indicator_level2 75
#property indicator_levelcolor White
//---- buffers
double Stoch8[];
double Stoch34[];
double Stoch16[];
double Stoch68[];
double Stoch24[];
double Stoch102[];
double Stoch32[];
double Stoch136[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,Stoch8);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,Stoch34);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,Stoch16);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,Stoch68);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,Stoch24);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,Stoch102);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,Stoch32);
SetIndexStyle(7,DRAW_LINE);
SetIndexBuffer(7,Stoch136);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit = Bars-counted_bars;
//----
for(int i=limit;i>=0;i--)
{
Stoch8[i]=iStochastic(NULL,0,8,3,3,MODE_SMA,0,MODE_MAIN,i);
// Stoch34[i]=iStochastic(NULL,0,28,11,5,3,1,MODE_SIGNAL,i);
Stoch16[i]=iStochastic(NULL,0,16,3,3,MODE_SMA,0,MODE_MAIN,i);
Stoch68[i]=iStochastic(NULL,0,34,3,3,MODE_SMA,0,MODE_MAIN,i);
//Stoch24[i]=iStochastic(NULL,0,64,3,3,MODE_SMA,0,MODE_MAIN,i);
// Stoch102[i]=iStochastic(NULL,0,128,3,3,MODE_SMA,0,MODE_MAIN,i);
// Stoch32[i]=iStochastic(NULL,0,256,3,3,MODE_SMA,0,MODE_MAIN,i);
// Stoch136[i]=iStochastic(NULL,0,512,3,3,MODE_SMA,0,MODE_MAIN,i);
}
//----
return(0);
}
//+------------------------------------------------------------------+
piptopia
 
Posts: 2
Joined: Fri Aug 27, 2010 1:02 pm


Re: TRANSLATE MLQ TO LUA (TRUE STOCHASTIC)

Postby Alexander.Gettinger » Sun Sep 05, 2010 10:49 pm

You may find indicator here: viewtopic.php?f=17&t=2070
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot] and 22 guests