Indexex formula

 

Hello.

Formula of USD index is  

 USDX = 50,14348112 × EURUSD^-0,576 × USDJPY^0,136 × GBPUSD^-0,119 × USDCAD^0,091 × USDSEK^0,042 × USDCHF^0,036

 

How to calculate other indexes? 

 EURX - Euro Currency Index 

GBPX - British Pound Currency Index 
CHFX - Swiss Franc Currency Index 
CADX - Canadian Dollar Currency Index 
JPYX - Japanese Yen Currency Index 
AUDX - Australian Dollar Currency Index 
NZDX - New Zealand Dollar Currency Index 
 

Found this.

  • EURLFX = USDX*EURUSD – the Euro index
  • GBPLFX = USDX*GBPUSD – the index of the British pound
  • AUDLFX = USDX*AUDUSD – the index of the Australian dollar
  • NZDLFX = USDX*NZDUSD – the index of the new Zealand dollar
  • CADLFX = USDX/USDCAD – the index of the Canadian dollar
  • CHFLFX = USDX/USDCHF – the index of the Swiss franc
  • LFXJPY = USDJPY/USDX – the index of the Japanese yen
 

Who can help me to write data to file(to create offline chart)?

I have 4 buffers with prices (open,close,high,low). 

This code I have.

void OnStart()
{

int ExtHandle=FileOpenHistory("new chart.hst",FILE_BIN|FILE_WRITE);

   FileWriteInteger(ExtHandle,1.0,LONG_VALUE);
   FileWriteString(ExtHandle,"eevviill",64);
   FileWriteString(ExtHandle,"symb_1",12);
   FileWriteInteger(ExtHandle,PERIOD_CURRENT,LONG_VALUE);
   FileWriteInteger(ExtHandle,4,LONG_VALUE);
   FileWriteInteger(ExtHandle, 0, LONG_VALUE);      
   FileWriteInteger(ExtHandle, 0, LONG_VALUE);       

for(int i=Bars-1;i>=0;i--)
{
    FileWriteDouble(ExtHandle,open_[i],DOUBLE_VALUE);
   FileWriteDouble(ExtHandle,high_[i],DOUBLE_VALUE);
   FileWriteDouble(ExtHandle,low_[i],DOUBLE_VALUE);
   FileWriteDouble(ExtHandle,close_[i],DOUBLE_VALUE);
}

FileClose(ExtHandle);

}
Reason: