Miscellaneous
0
Views
0
Downloads
0
Favorites
a_Nina
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int PeriodWATR=10;
extern double Kwatr=1.0000;
extern int HighLow=0;
extern int cbars = 1000;
extern int from = 0;
extern int period = PERIOD_M30;
//---- indicator buffers
double LineBuyBuffer[];
double LineSellBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init(){
string short_name;
//---- indicator line
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,2);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,2);
SetIndexEmptyValue(0,0);
SetIndexArrow(0,233);
SetIndexEmptyValue(1,0);
SetIndexArrow(1,234);
SetIndexBuffer(0,LineBuyBuffer);
SetIndexBuffer(1,LineSellBuffer);
//---- name for DataWindow and indicator subwindow label
short_name="NinaX";
IndicatorShortName(short_name);
//----
return(0);
}
int start(){
int i,b,f = iBarShift(NULL,period,Time[from]),l = 0;
ArrayInitialize(LineBuyBuffer,0);
ArrayInitialize(LineSellBuffer,0);
for(i=cbars-1;i>=from;i--){
b = iBarShift(NULL,period,Time[i]);
if(l==b){
LineBuyBuffer[i] = 0;
LineSellBuffer[i] = 0;
}
else{
l = b;
LineBuyBuffer[i] = iCustom(NULL,period,"aNina",PeriodWATR,Kwatr,HighLow,cbars,f,2,b);
if(LineBuyBuffer[i]!=0) LineBuyBuffer[i] = Low[i]-10*Point;
LineSellBuffer[i] = iCustom(NULL,period,"aNina",PeriodWATR,Kwatr,HighLow,cbars,f,3,b);
if(LineSellBuffer[i]!=0) LineSellBuffer[i] = High[i]+10*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
---