Miscellaneous
0
Views
0
Downloads
0
Favorites
WPR G-J
//+------------------------------------------------------------------+
//| äâà G-J .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_separate_window
#property indicator_buffers 2
#property indicator_color1 White
#property indicator_color2 Blue
//---- input parameters
extern int P = 14;
extern int n1 = 14;
extern int n2 = 14;
extern int CountBars=3500;
//---- buffers
double val1[];
double val2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW, EMPTY);
SetIndexArrow(0,108);
SetIndexBuffer(0,val1);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_ARROW, EMPTY);
SetIndexArrow(1,108);
SetIndexBuffer(1,val2);
SetIndexEmptyValue(1,0.0);
//----
return(0);
}
//+------------------------------------------------------------------+
//| AltrTrend_Signal_v2_2 |
//+------------------------------------------------------------------+
int start()
{ double F_u_EUR,F_u_GBP,F_d_EUR,F_d_GBP;
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
F_u_EUR=iCustom("GBPUSD",15,"WPRfast",P,n1,n2,3000,0,i);
F_d_EUR=iCustom("GBPUSD",15,"WPRfast",P,n1,n2,3000,1,i);
F_u_GBP=iCustom("GBPJPY",15,"WPRfast",P,n1,n2,3000,0,i);
F_d_GBP=iCustom("GBPJPY",15,"WPRfast",P,n1,n2,3000,1,i);
if (F_u_EUR>0&&F_u_GBP>0)
{
val1[i]=High[i]+35*Point;
}
if (0>F_d_EUR&&0>F_d_GBP)
{
val2[i]=Low[i]-35*Point;
}
}
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
---