Author: Copyright � 2012, MetaQuotes Software Corp.
Price Data Components
Series array that contains the highest prices of each barSeries array that contains the lowest prices of each bar
1 Views
0 Downloads
0 Favorites
Midvol
//+------------------------------------------------------------------+
//|                                                       Midvol.mq4 |
//|                      Copyright © 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
#property indicator_chart_window
extern int       Äàëüíîñòü=60;
extern int       Ïåðèîä=1440;
extern color     Öâåò=Green;
int init()
{
ObjectsDeleteAll(0,OBJ_ARROW);
return(0);
}
int deinit()
{
ObjectsDeleteAll(0,OBJ_ARROW);
return(0);
}
int start()
{
int    counted_bars=IndicatorCounted();
int i;
for (i=Äàëüíîñòü;i>0;i--)
{
double Lmax=iHigh(0,Ïåðèîä,i);
double Lmin=iLow(0,Ïåðèîä,i);
double Lmid=Lmax-((Lmax-Lmin)/2);
string Lmidname=DoubleToStr(Lmid, 4);
datetime Place =iTime(NULL,Ïåðèîä,i-1);
ObjectCreate(Lmidname,OBJ_ARROW,0,Place,Lmid,0,0);
ObjectSet( Lmidname, OBJPROP_COLOR, Öâåò) ;
}
return(0);
}

Comments