Geo_ShowOpenDayLevel

Author: Copyright � 2012, Geokom
Price Data Components
Series array that contains open time of each barSeries array that contains open prices of each bar
Miscellaneous
Implements a curve of type %1
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 supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---