CHFJPY





//+------------------------------------------------------------------+
//|                                                       EURUSD.mq4 |
//|                                              SemSemFX@rambler.ru |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "SemSemFX@rambler.ru"
#property link      ""
#include <UEGCJ.h>

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- input parameters
extern int       per1=8;
extern int       per2=3;
//---- buffers
double OUT[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorShortName("CHFJPY");
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,OUT);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
     int limit;
     int counted_bars=IndicatorCounted();
     double OPEN,HIGH,LOW,CLOSE;

  //---- ïðîâåðêà íà âîçìîæíûå îøèáêè
     if(counted_bars<0) return(-1);
  //---- ïîñëåäíèé ïîñ÷èòàííûé áàð áóäåò ïåðåñ÷èòàí
     if(counted_bars>0) counted_bars-=10;
     limit=Bars-counted_bars;
  //---- îñíîâíîé öèêë
     int Price=6;
     int Mode=3;
     double EUR, GBP, CHF, JPY;
     for(int i=0; i<limit; i++)
       {
        OPEN=GBP(Mode,PRICE_OPEN,i,per1,per2)-JPY(Mode,PRICE_OPEN,i,per1,per2);
        HIGH=GBP(Mode,PRICE_HIGH,i,per1,per2)-JPY(Mode,PRICE_HIGH,i,per1,per2);
        LOW=GBP(Mode,PRICE_LOW,i,per1,per2)-JPY(Mode,PRICE_LOW,i,per1,per2);
        CLOSE=GBP(Mode,PRICE_CLOSE,i,per1,per2)-JPY(Mode,PRICE_CLOSE,i,per1,per2);
        OUT[i]=(OPEN+HIGH+LOW+CLOSE)/4;
       }
   
//----
   return(0);
  }



//+------------------------------------------------------------------+



Sample





Analysis



Market Information Used:



Indicator Curves created:

Implements a curve of type DRAW_LINE


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: