Miscellaneous
0
Views
0
Downloads
0
Favorites
PointPrice
//+------------------------------------------------------------------+
//| PointPrice.mq4 |
//| Copyright © 2010, Ñåðãååâ Àëåêñåé aka sergeev|
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 LimeGreen
extern string HintMode="0-Close; 1-Open; 2-High; 3-Low; 4-Median; 5-Typical; 6-Weighted";
extern int Mode=PRICE_MEDIAN;
extern int Size=1;
extern string HintArrow="key code from Wingdings: 167-square, 119-rhombus, 159-circle";
extern int Arrow=159;
double PP[];
//------------------------------------------------------------------
int init()
{
Size=MathMax(Size, 1);
SetIndexBuffer(0,PP); SetIndexStyle(0, DRAW_ARROW, EMPTY, Size); SetIndexArrow(0, Arrow);
return(0);
}
//------------------------------------------------------------------
int deinit() { return(0); }
//------------------------------------------------------------------ start
int start()
{
for(int i=0; i<Bars; i++)
switch (Mode)
{
case PRICE_CLOSE: PP[i]=Close[i]; break;
case PRICE_OPEN: PP[i]=Open[i]; break;
case PRICE_HIGH: PP[i]=High[i]; break;
case PRICE_LOW: PP[i]=Low[i]; break;
case PRICE_MEDIAN: PP[i]=(High[i]+Low[i])/2; break;
case PRICE_TYPICAL: PP[i]=(High[i]+Low[i]+Close[i])/3; break;
case PRICE_WEIGHTED: PP[i]=(High[i]+Low[i]+Close[i]+Close[i])/4; break;
default: Mode=PRICE_CLOSE; PP[i]=Close[i]; break;
}
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
---