Price Data Components
Miscellaneous
0
Views
0
Downloads
0
Favorites
Geo_ShowOpenDayLevel
//+------------------------------------------------------------------+
//| Geo_ShowOpenDayLevel.mq4 |
//| Copyright © 2011, Geokom |
//| geokom2004@yandex.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2012, Geokom"
#property link "geokom2004@yandex.ru"
// Geo_2 - îòîáðàæåíèå ëèíèè íà óðîâíå ìåæäó High è Low
// Geo_ShowOpenDayLevel - îòîáðàæåíèå óðîâíÿ îòêðûòèÿ äíÿ
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Black //
#property indicator_width1 1
//#define
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0,DRAW_LINE,3,1);
SetIndexBuffer(0,ExtMapBuffer1);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
// ïðîâåðèì âîçìîæíûå îøèáêè - çà÷åì âðåìÿ òåðÿòü, åñëè íåò íè÷åãî
if(counted_bars<0) return(-1);
// ïåðåñ÷èòàåì ïîñëåäíèé
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
{
if ( TimeDayOfWeek (iTime( NULL, 0, i)) == 0) continue;
datetime BarTime = iTime( NULL, 0, i) ;
datetime BeginTime = StrToTime (TimeYear(BarTime) + "." + TimeMonth(BarTime)+ "." + TimeDay(BarTime) );
int BeginBar = iBarShift (NULL,0, BeginTime, false);
int Bar = iBarShift (NULL,PERIOD_D1, BarTime, false);
ExtMapBuffer1[i] = iOpen(NULL,PERIOD_D1, Bar);
}
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
---