Miscellaneous
0
Views
0
Downloads
0
Favorites
EURJPY
//+------------------------------------------------------------------+
//| 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("EURJPY");
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=EUR(Mode,PRICE_OPEN,i,per1,per2)-JPY(Mode,PRICE_OPEN,i,per1,per2);
HIGH=EUR(Mode,PRICE_HIGH,i,per1,per2)-JPY(Mode,PRICE_HIGH,i,per1,per2);
LOW=EUR(Mode,PRICE_LOW,i,per1,per2)-JPY(Mode,PRICE_LOW,i,per1,per2);
CLOSE=EUR(Mode,PRICE_CLOSE,i,per1,per2)-JPY(Mode,PRICE_CLOSE,i,per1,per2);
OUT[i]=(OPEN+HIGH+LOW+CLOSE)/4;
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---