Use this string:
string q[] = {"EURUSD","GBPUSD","USDJPY","EURJPY","GBPJPY","USDCHF","USDCAD","NZDUSD"};
TRO, Heiken-Ashi Smoothed request?.. would be very useful
Moderator: moderators
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
-
- rank: 150+ posts
- Posts: 216
- Joined: Fri Feb 13, 2009 7:52 pm
- Reputation: 0
- Gender:
- Contact:
-
- rank: 150+ posts
- Posts: 216
- Joined: Fri Feb 13, 2009 7:52 pm
- Reputation: 0
- Gender:
- Contact:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
-
- rank: 150+ posts
- Posts: 216
- Joined: Fri Feb 13, 2009 7:52 pm
- Reputation: 0
- Gender:
- Contact:
Sure thing Flinux...
//+------------------------------------------------------------------+
//| FLI_MP_HAS.mq4 |
//| Copyright ? 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ? 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_chart_window
string q[] = {"EURUSD","GBPUSD","USDJPY","EURJPY","GBPJPY","USDCHF","USDCAD","NZDUSD"};
int t[] = {PERIOD_M1,PERIOD_M5,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1,PERIOD_W1,PERIOD_MN1};
string TAG="FLIMPHAS";
extern int maMethod = 2;
extern int maPeriod = 6;
extern int maMethod2 = 3;
extern int maPeriod2 = 2;
int nq, nt;
extern int xShift=300;
extern int yShift=250;
int getHAS(string s, int tf)
{
double a, b;
a = iCustom(s,tf,"Heiken_Ashi_Smoothed",maMethod,maPeriod,maMethod2,maPeriod2,6,0);
b = iCustom(s,tf,"Heiken_Ashi_Smoothed",maMethod,maPeriod,maMethod2,maPeriod2,7,0);
if (a<b) return(1);
if (a>b) return(-1);
return(0);
}
void ObDeleteObjectsByPrefix(string Prefix)
{
int L = StringLen(Prefix);
int i = 0;
while(i < ObjectsTotal())
{
string ObjName = ObjectName(i);
if(StringSubstr(ObjName, 0, L) != Prefix)
{
i++;
continue;
}
ObjectDelete(ObjName);
}
}
int init()
{
int i, j;
deinit();
nq = ArraySize(q);
nt = ArraySize(t);
ObjectCreate(TAG+"Head",OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"Head",OBJPROP_CORNER,1);
ObjectSet(TAG+"Head",OBJPROP_XDISTANCE,xShift+55);
ObjectSet(TAG+"Head",OBJPROP_YDISTANCE,yShift+0);
ObjectSetText(TAG+"Head","Heiken Ashi Smoothed DB",12,"Courier",DeepSkyBlue);
for (i=0;i<nq;i++)
{
ObjectCreate(TAG+"lblCurr"+i,OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_CORNER,1);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_XDISTANCE,xShift+180);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_YDISTANCE,yShift+20*(i+1));
ObjectSetText(TAG+"lblCurr"+i,q[i],12,"Courier",Silver);
for (j=0;j<nt;j++)
{
ObjectCreate(TAG+"x"+j+"c"+i,OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_CORNER,1);
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_XDISTANCE,xShift+150-(20*j));
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_YDISTANCE,yShift+20*(i+1));
}
}
return(0);
}
int deinit()
{
ObDeleteObjectsByPrefix(TAG);
return(0);
}
int start()
{
int counted_bars=IndicatorCounted();
int a;
int i, j;
for (i=0;i<nq;i++)
{
for (j=0;j<nt;j++)
{
a = getHAS(q[i],t[j]);
if (a==1)
ObjectSetText(TAG+"x"+j+"c"+i,"B",12,"Courier",Lime);
else if (a==-1)
ObjectSetText(TAG+"x"+j+"c"+i,"S",12,"Courier",Red);
else if (a==0)
ObjectSetText(TAG+"x"+j+"c"+i,"W",12,"Courier",Yellow);
}
}
return(0);
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| FLI_MP_HAS.mq4 |
//| Copyright ? 2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ? 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_chart_window
string q[] = {"EURUSD","GBPUSD","USDJPY","EURJPY","GBPJPY","USDCHF","USDCAD","NZDUSD"};
int t[] = {PERIOD_M1,PERIOD_M5,PERIOD_M15,PERIOD_M30,PERIOD_H1,PERIOD_H4,PERIOD_D1,PERIOD_W1,PERIOD_MN1};
string TAG="FLIMPHAS";
extern int maMethod = 2;
extern int maPeriod = 6;
extern int maMethod2 = 3;
extern int maPeriod2 = 2;
int nq, nt;
extern int xShift=300;
extern int yShift=250;
int getHAS(string s, int tf)
{
double a, b;
a = iCustom(s,tf,"Heiken_Ashi_Smoothed",maMethod,maPeriod,maMethod2,maPeriod2,6,0);
b = iCustom(s,tf,"Heiken_Ashi_Smoothed",maMethod,maPeriod,maMethod2,maPeriod2,7,0);
if (a<b) return(1);
if (a>b) return(-1);
return(0);
}
void ObDeleteObjectsByPrefix(string Prefix)
{
int L = StringLen(Prefix);
int i = 0;
while(i < ObjectsTotal())
{
string ObjName = ObjectName(i);
if(StringSubstr(ObjName, 0, L) != Prefix)
{
i++;
continue;
}
ObjectDelete(ObjName);
}
}
int init()
{
int i, j;
deinit();
nq = ArraySize(q);
nt = ArraySize(t);
ObjectCreate(TAG+"Head",OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"Head",OBJPROP_CORNER,1);
ObjectSet(TAG+"Head",OBJPROP_XDISTANCE,xShift+55);
ObjectSet(TAG+"Head",OBJPROP_YDISTANCE,yShift+0);
ObjectSetText(TAG+"Head","Heiken Ashi Smoothed DB",12,"Courier",DeepSkyBlue);
for (i=0;i<nq;i++)
{
ObjectCreate(TAG+"lblCurr"+i,OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_CORNER,1);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_XDISTANCE,xShift+180);
ObjectSet(TAG+"lblCurr"+i,OBJPROP_YDISTANCE,yShift+20*(i+1));
ObjectSetText(TAG+"lblCurr"+i,q[i],12,"Courier",Silver);
for (j=0;j<nt;j++)
{
ObjectCreate(TAG+"x"+j+"c"+i,OBJ_LABEL,0,0,0,0,0);
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_CORNER,1);
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_XDISTANCE,xShift+150-(20*j));
ObjectSet(TAG+"x"+j+"c"+i,OBJPROP_YDISTANCE,yShift+20*(i+1));
}
}
return(0);
}
int deinit()
{
ObDeleteObjectsByPrefix(TAG);
return(0);
}
int start()
{
int counted_bars=IndicatorCounted();
int a;
int i, j;
for (i=0;i<nq;i++)
{
for (j=0;j<nt;j++)
{
a = getHAS(q[i],t[j]);
if (a==1)
ObjectSetText(TAG+"x"+j+"c"+i,"B",12,"Courier",Lime);
else if (a==-1)
ObjectSetText(TAG+"x"+j+"c"+i,"S",12,"Courier",Red);
else if (a==0)
ObjectSetText(TAG+"x"+j+"c"+i,"W",12,"Courier",Yellow);
}
}
return(0);
}
//+------------------------------------------------------------------+
-
- rank: 150+ posts
- Posts: 216
- Joined: Fri Feb 13, 2009 7:52 pm
- Reputation: 0
- Gender:
- Contact:
-
- rank: <50 posts
- Posts: 13
- Joined: Mon May 22, 2006 12:52 am
- Reputation: 0
- Gender:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.