Miscellaneous
0
Views
0
Downloads
0
Favorites
super-signals_Test
//+------------------------------------------------------------------+
//| super-signals.mq4 |
//| Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link "http://www.forex-tsd.com/"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_color2 Lime
#property indicator_width2 2
#property indicator_color3 Yellow
#property indicator_width3 2
#property indicator_color4 Brown
#property indicator_width4 2
extern int SignalGap = 4;
extern int BarsToCount = 500;
int OneInitOnly=true;
int dist=24;
double b1[];
double b2[];
double b3[];
double b4[];
int init()
{
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(0,234); //234
SetIndexBuffer(0,b1);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(1,233); //233
SetIndexBuffer(1,b2);
SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(2,217);
SetIndexBuffer(2,b3);
SetIndexStyle(3,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(3,218);
SetIndexBuffer(3,b4);
if(OneInitOnly==true)
{
int i;
OneInitOnly=false;
for (i=BarsToCount;i>=0;i--)
{
b1[i]=EMPTY_VALUE;
b2[i]=EMPTY_VALUE;
b3[i]=EMPTY_VALUE;
b4[i]=EMPTY_VALUE;
}
}
}
int start() {
int k,i,j,limit,hhb,llb, hhb2, llb2;
for (i=BarsToCount;i>=0;i--)
{
hhb = iHighest(Symbol(),0,MODE_HIGH,dist,i-dist/2);
llb = iLowest(Symbol(),0,MODE_LOW,dist,i-dist/2);
hhb2 = iHighest(Symbol(),0,MODE_HIGH,dist,i);
llb2 = iLowest(Symbol(),0,MODE_LOW,dist,i);
if (i==hhb) b1[i]=High[hhb]+SignalGap*Point;
if (i==llb) b2[i]=Low[llb]-SignalGap*Point;
if (i==hhb2) b3[i]=High[hhb2]+SignalGap*Point;
if (i==llb2) b4[i]=Low[llb2]-SignalGap*Point;
}
}
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
---