0
Views
0
Downloads
0
Favorites
Vollev
// Vollev v26.03.10
#property copyright "Jon Katana"
#property indicator_chart_window
double U, D, S, s, v;
int Levels = 2584;
int FontSize = 7;
extern color FontColor = White;
extern color LineColor = Silver;
int i, z, b=0;
int Dig;
extern int BarStep=74;
extern int DigStep=0;
int init()
{
}
int start()
{
Dig=Digits-DigStep;
for(z=0; z<Levels; z++)
{
for (i=BarStep; i>0; i--)
{
if(BarStep>Bars) i=Bars;
s+=(High[i]-Low[i]);
b++;
}
v=s/b;
U = NormalizeDouble ( (v*z), Dig);
if(ObjectFind("U"+z) != 0)
{ObjectCreate("U"+z, OBJ_TEXT, 0, Time[0], U);
ObjectSetText("U"+z, " " + DoubleToStr(U, Digits) + "", FontSize, "Arial", FontColor);}
else {ObjectMove("U"+z, " " + U + "", Time[0], U);}
if(ObjectFind("U Line"+z) != 0)
{ObjectCreate("U Line"+z, OBJ_HLINE, 0, Time[0], U);
ObjectSet("U Line"+z, OBJPROP_STYLE, STYLE_DOT);
ObjectSet("U Line"+z, OBJPROP_COLOR, LineColor);}
else {ObjectMove("U Line"+z,0, Time[0], U);}
D = NormalizeDouble ( ((-v)*z), Dig);
if(ObjectFind("D"+z) != 0)
{ObjectCreate("D"+z, OBJ_TEXT, 0, Time[0], D);
ObjectSetText("D"+z, " " + DoubleToStr(D, Digits) + "", FontSize, "Arial", FontColor);}
else {ObjectMove("D"+z, " " + D + "", Time[0], D);}
if(ObjectFind("D Line"+z) != 0)
{ObjectCreate("D Line"+z, OBJ_HLINE, 0,0, D);
ObjectMove("D Line"+z,0,0, D);
ObjectSet("D Line"+z, OBJPROP_STYLE, STYLE_DOT);
ObjectSet("D Line"+z, OBJPROP_COLOR, LineColor);}
else {ObjectMove("D Line"+z,0,0, D);}
}
S = NormalizeDouble ( (High[1]-Low[1]), Dig);
{ObjectCreate("S", OBJ_LABEL, 0, 0, 0);
ObjectSet("S", OBJPROP_XDISTANCE, 20);
ObjectSet("S", OBJPROP_YDISTANCE, MathCeil(2*FontSize));
ObjectSetText("S", "VolStep = "+DoubleToStr ( NormalizeDouble (v, Dig)/Point, 0 ), FontSize*2, "Arial", FontColor);}
return(0);}
int deinit()
{for(z=0; z<Levels; z++)
{ObjectDelete("U"+z);
ObjectDelete("U Line"+z);
ObjectDelete("D"+z);
ObjectDelete("D Line"+z);
ObjectDelete("S");}
WindowRedraw();
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
---