BWLIC

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

BWLIC

Postby elmcceen » Tue Jun 01, 2010 7:47 am

Could this be translated to lua?!?...

Code: Select all
//+------------------------------------------------------------------+
//|                                                          SSL.mq4 |
//+------------------------------------------------------------------+
//----
#property indicator_buffers 1
#property indicator_color1 Blue
extern int Periode=10;

double hilo_buffer[],newPlot=0,lastPlot=0;
double avgHigh=0,avgLow=0;
int ExtCountedBars=0;
int barsstart,bardiff,mod,cnt;
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {     
   SetIndexBuffer(0,hilo_buffer);
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2);
   ExtCountedBars=IndicatorCounted();
   Print("ExtCount="+ExtCountedBars);
   Print("Bars="+Bars);
   barsstart=Bars;
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {double m,q1,q2,q3,q4;
   int p,hidx,lidx;
   //--- ---
   p=Period(); //in minuten;
   //4wochen = 4w * 5.5tage * 24h *60min = 31680 min / 4 wochen
   //p=1 => cnt=28800
   //p=1440 => cnt=28800/1440
   //cnt=31680/p; //bei 6 wochen 30tage * 24h * 60min = 43200
   
   hidx=iHighest(NULL,PERIOD_D1, MODE_HIGH,23,0); //hmmmm
   lidx=iLowest(NULL,PERIOD_D1, MODE_LOW,23,0); //hmmmm
   q4=iHigh(NULL,PERIOD_D1,hidx);
   q1=iLow(NULL,PERIOD_D1,lidx);
/*
   hidx=iHighest(NULL,0, MODE_HIGH,cnt,0); //hmmmm
   lidx=iLowest(NULL,0, MODE_LOW,cnt,0); //hmmmm
   q4=iHigh(NULL,0,hidx);
   q1=iLow(NULL,0,lidx);
*/
   
   m=(q4+q1)/2;
   q2=(q1+m)/2;
   q3=(m+q4)/2;
   //--- ---
   ObjectDelete("Q1Line");
   ObjectDelete("Q2Line");
   ObjectDelete("MLine");
   ObjectDelete("Q3Line");
   ObjectDelete("Q4Line");
   //--- ---
   ObjectCreate("Q1Line", OBJ_HLINE,0, CurTime(),q1);
   ObjectSet("Q1Line", OBJPROP_COLOR, Green);
   ObjectSet("Q1Line", OBJPROP_STYLE, STYLE_DASH);
   //--- ---
   ObjectCreate("Q2Line", OBJ_HLINE,0, CurTime(),q2);
   ObjectSet("Q2Line", OBJPROP_COLOR, Green);
   ObjectSet("Q2Line", OBJPROP_STYLE, STYLE_DASH);
   //--- ---
   ObjectCreate("MLine", OBJ_HLINE,0, CurTime(),m);
   ObjectSet("MLine", OBJPROP_COLOR, Yellow);
   ObjectSet("MLine", OBJPROP_STYLE, STYLE_DASH);
   //--- ---
   ObjectCreate("Q3Line", OBJ_HLINE,0, CurTime(),q3);
   ObjectSet("Q3Line", OBJPROP_COLOR, Red);
   ObjectSet("Q3Line", OBJPROP_STYLE, STYLE_DASH);
   //--- ---
   ObjectCreate("Q4Line", OBJ_HLINE,0, CurTime(),q4);
   ObjectSet("Q4Line", OBJPROP_COLOR, Red);
   ObjectSet("Q4Line", OBJPROP_STYLE, STYLE_DASH);
   
   return(0);
  }
//+------------------------------------------------------------------+
elmcceen
 
Posts: 25
Joined: Sun Apr 25, 2010 4:54 pm

Re: BWLIC

Postby elmcceen » Tue Jun 29, 2010 6:16 am

???
elmcceen
 
Posts: 25
Joined: Sun Apr 25, 2010 4:54 pm

Re: BWLIC

Postby Nikolay.Gekht » Tue Jun 29, 2010 4:29 pm

The indicator remains in queue. Sorry, two of three regular developers who worked on indicators are out of the play until Jul, 16 (the next internal release of the Trade Station), so I cannot promise to do this fast.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: BWLIC

Postby elmcceen » Mon Jul 05, 2010 2:42 am

It's no problem, i just wanted to ask..!
elmcceen
 
Posts: 25
Joined: Sun Apr 25, 2010 4:54 pm

Re: BWLIC

Postby Alexander.Gettinger » Wed Jul 28, 2010 12:31 am

You may find indicator here: viewtopic.php?f=17&t=1606
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 18 guests

cron