Adding the Dollar Index graph

 
Hello to you all.
Is there any way to add the graph of the dollar index to my meta trader 4?

Haim
 
Hello to you all.
Is there any way to add the graph of the dollar index to my meta trader 4?

Haim



//+------------------------------------------------------------------+
//| IndexDollar.mq4 |
//| Copyright © 2005, Zmiuka Software Corp. |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Zmiuka Software Corp."

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DeepPink

//---- input parameters
extern double GBP0=1.9185;
extern double EUR0=1.356;
extern double CHF0=1.1387;
extern double JPY0=102.6;
//---- buffers
double IndexBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;

//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,IndexBuffer);
SetIndexEmptyValue(0,0);
ArrayInitialize(IndexBuffer,0);

//---- name for DataWindow and indicator subwindow label
short_name="Index =";
IndicatorShortName(short_name);
SetIndexDrawBegin(0,2);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit, i;
double USD;
double Data1, Data2, Data3, Data4;

i=(3000-counted_bars)+1;

while(i>=0)
{
Data1=iClose("GBPUSD",NULL,i);
Data2=iClose("EURUSD",NULL,i);
Data3=iClose("USDCHF",NULL,i);
Data4=iClose("USDJPY",NULL,i);

USD = (GBP0 - Data1) * 100000
+ ((EUR0 - Data2) * 100000)
+ ((Data3 - CHF0) * 100000 / Data3)
+ ((Data4 - JPY0) * 100000 / Data4);

IndexBuffer[i]=USD; Comment("IndexDollar");

i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+








Also search forum for mindex hope this can help



Jannik
 
thank's
but what should i do with it ?

haim

Hello to you all.
Is there any way to add the graph of the dollar index to my meta trader 4?

Haim



//+------------------------------------------------------------------+
//| IndexDollar.mq4 |
//| Copyright © 2005, Zmiuka Software Corp. |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Zmiuka Software Corp."

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DeepPink

//---- input parameters
extern double GBP0=1.9185;
extern double EUR0=1.356;
extern double CHF0=1.1387;
extern double JPY0=102.6;
//---- buffers
double IndexBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;

//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,IndexBuffer);
SetIndexEmptyValue(0,0);
ArrayInitialize(IndexBuffer,0);

//---- name for DataWindow and indicator subwindow label
short_name="Index =";
IndicatorShortName(short_name);
SetIndexDrawBegin(0,2);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit, i;
double USD;
double Data1, Data2, Data3, Data4;

i=(3000-counted_bars)+1;

while(i>=0)
{
Data1=iClose("GBPUSD",NULL,i);
Data2=iClose("EURUSD",NULL,i);
Data3=iClose("USDCHF",NULL,i);
Data4=iClose("USDJPY",NULL,i);

USD = (GBP0 - Data1) * 100000
+ ((EUR0 - Data2) * 100000)
+ ((Data3 - CHF0) * 100000 / Data3)
+ ((Data4 - JPY0) * 100000 / Data4);

IndexBuffer[i]=USD; Comment("IndexDollar");

i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+








Also search forum for mindex hope this can help



Jannik
 
Hey


Create new custom indicator copy and paste code :-) (metaeditor)




Right click on custom indicator /create ( then u should know how to do)


Jannik
 
[quote]thank's
but what should i do with it ?




hey try look this one same result as the dollar index but look this site "correlation indicator"


Jannik
 
Hello to you all.
Is there any way to add the graph of the dollar index to my meta trader 4?

Haim



//+------------------------------------------------------------------+
//| IndexDollar.mq4 |
//| Copyright © 2005, Zmiuka Software Corp. |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Zmiuka Software Corp."

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DeepPink

//---- input parameters
extern double GBP0=1.9185;
extern double EUR0=1.356;
extern double CHF0=1.1387;
extern double JPY0=102.6;
//---- buffers
double IndexBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;

//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,IndexBuffer);
SetIndexEmptyValue(0,0);
ArrayInitialize(IndexBuffer,0);

//---- name for DataWindow and indicator subwindow label
short_name="Index =";
IndicatorShortName(short_name);
SetIndexDrawBegin(0,2);
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit, i;
double USD;
double Data1, Data2, Data3, Data4;

i=(3000-counted_bars)+1;

while(i>=0)
{
Data1=iClose("GBPUSD",NULL,i);
Data2=iClose("EURUSD",NULL,i);
Data3=iClose("USDCHF",NULL,i);
Data4=iClose("USDJPY",NULL,i);

USD = (GBP0 - Data1) * 100000
+ ((EUR0 - Data2) * 100000)
+ ((Data3 - CHF0) * 100000 / Data3)
+ ((Data4 - JPY0) * 100000 / Data4);

IndexBuffer[i]=USD; Comment("IndexDollar");

i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+








Also search forum for mindex hope this can help



Jannik


thank you very much, Jannik. But i have tried it for many times...it still doesn't work!!
I've heard of that only MT3.8 has Dollar Index because only it's server provides Dollar Index...
( I've tried MT3 but there was some problems with registration....so i gave up...)
It's really a pity that MT4 has no Dollar Index...sign...

Is there any other way to put Dollar index into MT4??? I really need Dollar index very much because it's very important for me to make some investment strategies... If anyone knows how to solve this problem, please answer me...
Thanks a lot!!!
Reason: