#4X 2010 EMA 50 Indicator for lua

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

#4X 2010 EMA 50 Indicator for lua

Postby WWMMACAU » Fri Mar 26, 2010 3:46 pm

Dear Sir,

I would like to request #4X 2010 EMA 50 Indicator from MQ4 to LUA.

Here is mq4 files of #4X 2010 EMA 50 Indicator.

Code: Select all
 
// #4X 2010 EMA 50            \¦/
// Knowledge of the ancients (ò ó)
//______________________o0o___(_)___o0o_____
//___¦Xard777¦_____¦_____¦_____¦_____¦_2010_¦

#property indicator_chart_window
//+------------------------------------------------------------------+
#property indicator_buffers 2
#property indicator_color1 Crimson
#property indicator_color2 Blue
#property indicator_width1 4
#property indicator_width2 4

double buf0[], buf1[], buf2[];
extern int MA_Period1 = 50;
extern int MA_Method1 = 1;
extern int MA_Price1  = 0;
extern int MA_Shift1  = 0;

int init() {
   IndicatorBuffers(3);
   SetIndexBuffer(0, buf0);
   SetIndexBuffer(1, buf1);
   SetIndexBuffer(2, buf2);
   SetIndexStyle(0, DRAW_LINE);
   SetIndexStyle(1, DRAW_LINE);
   return (0);
}

int start() {
   for (int X4 = Bars - 10; X4 >= 0; X4--) buf2[X4] = iMA(NULL,0,MA_Period1,MA_Shift1,MA_Method1,MA_Price1,X4); //iMA(NULL, 0, PeriodX, 0, MODE_LWMA, PRICE_MEDIAN, X4);
   for (int X8 = Bars - 10; X8 >= 0; X8--) {
      buf0[X8] = buf2[X8]; buf1[X8] = buf2[X8];
      if (buf2[X8] > buf2[X8 + 1]) {
         buf0[X8] = EMPTY_VALUE; buf1[X8 + 1] = buf2[X8 + 1];
      } else {
         if (buf2[X8] < buf2[X8 + 1]) {
            buf1[X8] = EMPTY_VALUE; buf0[X8 + 1] = buf2[X8 + 1];
         }
      }
   }
   return (0);
}
//--------------------------------------------Xard@hotmail.co.uk-----+
WWMMACAU
 
Posts: 23
Joined: Mon Mar 22, 2010 4:12 am

Re: #4X 2010 EMA 50 Indicator for lua

Postby Alexander.Gettinger » Mon Apr 12, 2010 11:33 pm

Please find the indicator here:
viewtopic.php?f=28&t=626
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: No registered users and 22 guests