Miscellaneous
0
Views
0
Downloads
0
Favorites
ang_Zad (C)_v2
#property copyright "ANG3110@latchess.com"
//--------ang_Zad (C)-------------------
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//----------------------
extern double ki=4;
//--------------------
double za[],z,za2[],z2;
//********************************************************
int init(){
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,za);
SetIndexBuffer(1,za2);
return(0);}
//********************************************************
int start() {
int i,cbi;
int n,ai,bi,f,ai2,bi2,f2;
cbi=Bars-IndicatorCounted()-1;
//------------------------------------------------------------------------------------------------------------------------------
for(i=cbi; i>=0; i--) {
if (Close[i]>z && Close[i]>Close[i+1]) z=za[i+1]+(Close[i]-za[i+1])/ki;
if (Close[i]<z && Close[i]<Close[i+1]) z=za[i+1]+(Close[i]-za[i+1])/ki;
if (Close[i]>z2 && Close[i]<Close[i+1]) z2=za2[i+1]+(Close[i]-za2[i+1])/ki;
if (Close[i]<z2 && Close[i]>Close[i+1]) z2=za2[i+1]+(Close[i]-za2[i+1])/ki;
if (i>Bars-5) {z=Close[i]; z2=z;}
za[i]=z;
za2[i]=z2;
}
//------------------------------------------------------
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
---