can you convert mq4 file to lua file?
if yes please convert following code to a LUA code .
thank you
- Code: Select all
++++++++++++++++++++++++++++++++++++
#property copyright " "
#property link " "
#property indicator_chart_window
string t0="23:29",t00="00:10",t1="03:29",t11="04:10",t2="07:29",t22="08:10";
string t3="11:29",t33="12:10",t4="15:29",t44="16:10",t5="19:29",t55="20:10";
extern int period=30;
string OutStr;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
Comment("");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----
string aaa;
aaa=TimeToStr(TimeCurrent(),TIME_MINUTES );
if ((aaa>="00:00"&&aaa<t00)||(aaa>t0&&aaa<="23:59")||(aaa>t1&&aaa<t11)||(aaa>t2&&aaa<t22)||(aaa>t3&&aaa<t33)||(aaa>t4&&aaa<t44)||(aaa>t5&&aaa<t55))
OutStr="\n\nTime = "+aaa+" ÊÇíã ããäæÚå ";
else
OutStr="\n\nTime = "+aaa+" ÊÇíã ßÇÑí ÊÑíÏ ÂÒÇÏ";
//----
OutStr=OutStr+"\n-----------------------------------------";
int i;
double m,n;
double sum=0;
//----
for(i=1;i<=period;i++){
m+=High[i];
n+=Low[i];
}
sum=m-n;
double telorance=sum/period;
//----
double ttoday=High[0]-Low[0];
if(ttoday>telorance)
OutStr=OutStr+"\nToday Telorance Is High = "+DoubleToStr(ttoday/Point,2)+"\nTelorance Is = "+DoubleToStr(telorance/Point,2);
else
OutStr=OutStr+"\nToday Telorance Is Low = "+DoubleToStr(ttoday/Point,2)+"\nTelorance Is = "+DoubleToStr(telorance/Point,2);
OutStr=OutStr+"\n-----------------------------------------";
double i1;
int m1,s1,k1;
m1=Time[0]+Period()*60-CurTime();
i1=m1/60.0;
s1=m1%60;
m1=(m1-m1%60)/60;
OutStr=OutStr+"\n" +m1 + " minutes " + s1 + " seconds left to bar end";
Comment(OutStr);
return(0);
}
//+------------------------------------------------------------------+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++