Индикаторы объемов МТ4

Bullra

Новичок
Быстрее Выше Сильнее

Индикаторы объемов от портала Кластер Дельты и самого TheXpert. Старые добрые объемы в новой сверхзвуковой оболочке. _http://trend-lab.blogspot.ru/

Правила установки:
1. В архиве все файлы расположены так, как они должны лежать по папкам. Это значит, что для установки скриптов необходимо скопировать папку experts в архиве в папку терминала, затем перезапустить терминал.
2. Поставить советник ClusterX_GetVolume на любой график (таймфрейм и инструмент не важен)
3. Поставить индикатор ClusterX_Volume.

По дельте все так же.

Если секунд через 10 при наличии тиков ничего не появляется, открываем вкладку "эксперты", смотрим, на что ругаются индикаторы и советники.
Если все плохо, копируем эту часть лога сюда: _http://forum.clusterdelta.com/showthread.php/1175--Индикаторы-ClusterX
 

Вложения

  • BetterVolume_ClusterXEdition.zip
    1,5 КБ · Просмотры: 1 091
  • ClusterX_FineVolumes.zip
    1,9 КБ · Просмотры: 1 028
  • delta build 451.zip
    49 КБ · Просмотры: 1 005
  • volume build 451.zip
    48,9 КБ · Просмотры: 927

Bullra

Новичок
ClusterX volume

Для всех, кто скачал. Чтобы индикаторы работали, в мета трейдере обязательно должны быть стандартные индикаторы Кластер Дельта.
 

fluda4ka

Элитный участник
Всем привет

:D
Просто шикарный индикатор. Нашел здесь на форуме, огромная благодарность fludachke за ее чудесный архив.
Привет, ты хоть людям ссылку на архив давай, а то я и сама уже забыла где клад зарыла:D
 

Bullra

Новичок
:D
Привет, ты хоть людям ссылку на архив давай, а то я и сама уже забыла где клад зарыла:D

Привет, извини не дам, захотят сами найдут. Да и в архиве больше нет ничего стоящего.

Раз уж я сюда зашел, то выложу еще один индикатор, который собирался выложить еще под Новый Год.

Классический индикатор Рыночного профиля в буквах. Может кому сгодится для коллекции или ознакомления.
 

Вложения

  • Market profile.rar
    60,1 КБ · Просмотры: 781
Последнее редактирование:

viktor08

Интересующийся
Ну если пошла такая пянка то и я выложу тс по ВСА
Добрый день, вечер, утро! Что-то из всех индикаторов системы на график выводятся только те, которые в шаблоне, хотя в папке индикаторов все закачано. Компиляция в метаэдиторе ничего не дает. У Вас все работает? НЕ в курсе, в чем может быть проблема?

Для всех, кто скачал. Чтобы индикаторы работали, в мета трейдере обязательно должны быть стандартные индикаторы Кластер Дельта.

Извиняюсь за неведение, но вразумите, советник ClusterX_GetVolume- он не торгует, а только снимает с сервера данные для индикаторов? И в этом вся его миссия? Или я заблуждаюсь?
 
Последнее редактирование модератором:

Bullra

Новичок
Добрый день, вечер, утро! Что-то из всех индикаторов системы на график выводятся только те, которые в шаблоне, хотя в папке индикаторов все закачано. Компиляция в метаэдиторе ничего не дает. У Вас все работает? НЕ в курсе, в чем может быть проблема?



Извиняюсь за неведение, но вразумите, советник ClusterX_GetVolume- он не торгует, а только снимает с сервера данные для индикаторов? И в этом вся его миссия? Или я заблуждаюсь?

Утро добрым не бывает! Советник только собирает данные с сервера ClusterDelta, причем для дельты есть отдельный сов! У скриптов та же самая функция!
 

Bullra

Новичок
Индикаторы серии eVOLution

Индикаторы серии eVOLution бесплатно предоставляют данные об открытом интересе и объемах с Чикагского Товарной Биржи. Для работы индикаторов требуется каждодневная подкачка данных с ресурса:_http://trading-evolution.com

Индикатор объемных уровней eVOLutin-levels


eurusd-d1-roboforex.png


рисует линии для:
* первые 3 линии объемов последнего торгового дня
* первые 3 линии объемов текущей недели
* первые 3 линии объемов последней торговой недели
* первые 3 линии объемов периода контракта


PHP:
//+------------------------------------------------------------------+
//|                                             eVOLution-levels.mq4 |
//|                Copyright � 2009-2010, someBody, trading-evolution.com |
//|                                 http://www.trading-evolution.com |
//+------------------------------------------------------------------+
#property copyright "Copyright � 2009-2010, someBody, trading-evolution.com"
#property link      "http://www.trading-evolution.com"

#property indicator_chart_window

#import

extern bool soundAlert = False;
extern int NumberOfLevelsToShow = 3;
extern string CustomLevels1="";
extern string CustomLevels2="";
extern string CustomSymbol = "";
extern bool ShowPreviousDayVolume = True;
extern bool ShowDayBeforePreviousDayVolume = True;
extern bool ShowThisWeekVolume = True;
extern bool ShowPreviousWeekVolume = True;
extern bool ShowContractVolume = True;
extern color PreviousDayVolumeColor = LimeGreen;
extern color DayBeforePreviousDayVolumeColor = Green;
extern color ThisWeekVolumeColor = DodgerBlue;
extern color PrevousWeekVolumeColor = Blue;
extern color ContractVolumeColor = Red;
extern color CustomLevel1VolumeColor = PeachPuff;
extern color CustomLevel2VolumeColor = LightSteelBlue;
extern int FontSize = 10;
extern int textXshift = 10;
extern int textYshift = 10;
extern int FirstLevelWidth = 1;
extern int SecondLevelWidth = 1;
extern int ThirdLevelWidth = 1;
extern int FirstLevelStyle = 0;
extern int SecondLevelStyle = 4;
extern int ThirdLevelStyle = 4;
extern double LevelsVerticalShift = 0;
string varray[50],FileSymbol;
int clevel1count,clevel2count;


//---- input parameters
int          corner=0;




double ExtMapBuffer1[];
  
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   
   int top=FontSize*7+textYshift+15;
   int left = 90;

//---- evolution levels
   string filename,
   buff_str = "";
   int shft,
   handle,
   height,
   pointer;
   shft=10;
   
   FileSymbol=Symbol();
   if(StringLen(CustomSymbol)>0) FileSymbol = CustomSymbol;
      filename = "/evolution-levels/evolution-levels-"+FileSymbol+".csv";

//   filename = "/evolution-levels/evolution-levels-"+Symbol()+".csv";
   handle=FileOpen(filename, FILE_CSV|FILE_READ);
    if(handle<0)                        
     {
      if(GetLastError()==4103)         
         Alert("No such file ");
      else                            
         Alert("Error opening file ");
      return(0);                      
     }
   int i=0;
     while ( !FileIsEnding(handle)) 
      {
      varray[i] = FileReadString(handle);
      i++;
      }
   FileClose( handle );   

//---------------------------------------------------------------

if (ShowPreviousDayVolume){
   
   if (NumberOfLevelsToShow>0){
    
      drawLine("pd1",varray[4] , varray[1], StrToDouble(varray[5]), PreviousDayVolumeColor,0,0,FirstLevelWidth);
      if (NumberOfLevelsToShow>1) {
         drawLine("pd2",varray[6] , varray[1], StrToDouble(varray[7]), PreviousDayVolumeColor,4,0,SecondLevelWidth);
      }
     
      if (NumberOfLevelsToShow>2) {  
         drawLine("pd3",varray[8] , varray[1], StrToDouble(varray[9]), PreviousDayVolumeColor,4,0,ThirdLevelWidth);
      }
   }
   string spd;
   spd = "spd";
   ObjectCreate(spd, OBJ_LABEL, 0, 0, 0, 0, 0);
   ObjectSet(spd, OBJPROP_XDISTANCE, textXshift);
   ObjectSet(spd, OBJPROP_YDISTANCE, FontSize*2+textYshift);
   ObjectSetText(spd, "Total volume for "+varray[1]+" is: ______ "+StrToInteger(varray[2]), FontSize, "Arial", PreviousDayVolumeColor);
}

//-------- Day Bedore Previous Day

if (ShowDayBeforePreviousDayVolume){ 
   if (NumberOfLevelsToShow>0){
    
      drawLine("dbpd1",varray[42] , varray[39], StrToDouble(varray[43]), DayBeforePreviousDayVolumeColor,FirstLevelStyle,0,FirstLevelWidth);
      if (NumberOfLevelsToShow>1) {
         drawLine("dbpd2",varray[44] , varray[39], StrToDouble(varray[45]), DayBeforePreviousDayVolumeColor,SecondLevelStyle,0,SecondLevelWidth);
      }
     
      if (NumberOfLevelsToShow>2) {  
         drawLine("dbpd3",varray[46] , varray[39], StrToDouble(varray[47]), DayBeforePreviousDayVolumeColor,ThirdLevelStyle,0,ThirdLevelWidth);
      }
   }

   string sdbpd;
      sdbpd = "sdbpd";
      ObjectCreate(sdbpd, OBJ_LABEL, 0, 0, 0, 0, 0);
      ObjectSet(sdbpd, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(sdbpd, OBJPROP_YDISTANCE, FontSize*3+textYshift+3);
      ObjectSetText(sdbpd, "Total volume for "+varray[39]+" is: ______ "+StrToInteger(varray[40]), FontSize, "Arial", DayBeforePreviousDayVolumeColor);

}

    
            
//----                                   ThisWeekVolume

if (ShowThisWeekVolume){

   if (NumberOfLevelsToShow>0){
    
      drawLine("tw1",varray[13] , varray[10], StrToDouble(varray[14]), ThisWeekVolumeColor,FirstLevelStyle,1,FirstLevelWidth);
      if (NumberOfLevelsToShow>1) {
         drawLine("tw2",varray[15] , varray[10], StrToDouble(varray[16]), ThisWeekVolumeColor,SecondLevelStyle,1,SecondLevelWidth);
      }
     
      if (NumberOfLevelsToShow>2) {  
         drawLine("tw3",varray[17] , varray[10], StrToDouble(varray[18]), ThisWeekVolumeColor,ThirdLevelStyle,1,ThirdLevelWidth);
      }
   }



  string stw;
      stw = "stw";
      ObjectCreate(stw, OBJ_LABEL, 0, 0, 0, 0, 0);
      ObjectSet(stw, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(stw, OBJPROP_YDISTANCE, FontSize*4+textYshift+6);
      ObjectSetText(stw, "Total volume for "+varray[10]+" period is: ______ "+StrToInteger(varray[11]), FontSize, "Arial", ThisWeekVolumeColor);
    }
 
//----                                   PreviousWeekVolume
 
 if (ShowPreviousWeekVolume) {
 
 
 
    if (NumberOfLevelsToShow>0){
    
      drawLine("pw1",varray[24] , varray[21], StrToDouble(varray[25]), PrevousWeekVolumeColor,FirstLevelStyle,1,FirstLevelWidth);
      if (NumberOfLevelsToShow>1) {
         drawLine("pw2",varray[26] , varray[21], StrToDouble(varray[27]), PrevousWeekVolumeColor,SecondLevelStyle,1,SecondLevelWidth);
      }
     
      if (NumberOfLevelsToShow>2) {  
         drawLine("pw3",varray[28] , varray[21], StrToDouble(varray[29]), PrevousWeekVolumeColor,ThirdLevelStyle,1,ThirdLevelWidth);
      }
   }
   
 
  string spw;
      spw = "spw";
      ObjectCreate(spw, OBJ_LABEL, 0, 0, 0, 0, 0);
      ObjectSet(spw, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(spw, OBJPROP_YDISTANCE, FontSize*5+textYshift+9);
      ObjectSetText(spw, "Total volume for "+varray[21]+" period is: ______ "+StrToInteger(varray[22]), FontSize, "Arial", PrevousWeekVolumeColor);

}

 //----                                   ContractVolume
 if (ShowContractVolume){
 
 
     if (NumberOfLevelsToShow>0){
    
      drawHLine("cv1",varray[33] , "090701", StrToDouble(varray[34]), ContractVolumeColor,FirstLevelStyle,FirstLevelWidth);
      if (NumberOfLevelsToShow>1) {
         drawHLine("cv2",varray[35] , "090701", StrToDouble(varray[36]), ContractVolumeColor,SecondLevelStyle,SecondLevelWidth);
      }
     
      if (NumberOfLevelsToShow>2) {  
         drawHLine("cv3",varray[37] , "090701", StrToDouble(varray[38]), ContractVolumeColor,ThirdLevelStyle,ThirdLevelWidth);
      }
   }

   string sc;
      sc = "sc";
      ObjectCreate(sc, OBJ_LABEL, 0, 0, 0, 0, 0);
      ObjectSet(sc, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(sc, OBJPROP_YDISTANCE, FontSize*6+textYshift+12);
      ObjectSetText(sc, "Total volume for contract period is: ______ "+StrToInteger(varray[31])+"", FontSize, "Arial", ContractVolumeColor);
}





//-------- Custom Levels 1
if (StringLen(CustomLevels1)>2){
CustomLevels1=StringTrimLeft(CustomLevels1);
CustomLevels1=StringTrimRight(CustomLevels1);
pointer=0;
clevel1count=1;
for (i=1;i<=StringLen(CustomLevels1);i++){

   if (StringGetChar(CustomLevels1,i)==59){
   string ctemplevel1=StringSubstr(CustomLevels1,pointer,i-pointer);
    if (ObjectFind("clevel1"+clevel1count) != 0) 
     {
      ObjectCreate("clevel1"+clevel1count,OBJ_HLINE,0,Time[0],StrToDouble(ctemplevel1));
      ObjectSetText("clevel1"+clevel1count,"Vol",10,"Arial", CustomLevel1VolumeColor);
      ObjectSet("clevel1"+clevel1count,OBJPROP_COLOR,CustomLevel1VolumeColor);
      ObjectSet("clevel1"+clevel1count,OBJPROP_WIDTH,1);
      ObjectSet("clevel1"+clevel1count,OBJPROP_STYLE,STYLE_SOLID);
     }
     else
     {
     ObjectMove("clevel1"+clevel1count, 0,Time[0],StrToDouble(ctemplevel1));
     }  
   clevel1count=clevel1count+1;
   pointer=i+1;
   }
   
}
  
}



//-------- Custom Levels 2
if (StringLen(CustomLevels2)>2){
CustomLevels2=StringTrimLeft(CustomLevels2);
CustomLevels2=StringTrimRight(CustomLevels2);
pointer=0;
clevel2count=1;
for (i=1;i<=StringLen(CustomLevels2);i++){

   if (StringGetChar(CustomLevels2,i)==59){
   string ctemplevel2=StringSubstr(CustomLevels2,pointer,i-pointer);
    if (ObjectFind("clevel2"+clevel2count) != 0) 
     {
      ObjectCreate("clevel2"+clevel2count,OBJ_HLINE,0,Time[0],StrToDouble(ctemplevel2));
      ObjectSetText("clevel2"+clevel2count,"Vol",10,"Arial", CustomLevel2VolumeColor);
      ObjectSet("clevel2"+clevel2count,OBJPROP_COLOR,CustomLevel2VolumeColor);
      ObjectSet("clevel2"+clevel2count,OBJPROP_WIDTH,1);
      ObjectSet("clevel2"+clevel2count,OBJPROP_STYLE,STYLE_SOLID);
     }
     else
     {
     ObjectMove("clevel2"+clevel2count, 0,Time[0],StrToDouble(ctemplevel2));
     }  
   clevel2count=clevel2count+1;
   pointer=i+1;
   }
   
}
  
}


 //----    
      ObjectCreate("header", OBJ_LABEL, 0, 0, 0, 0, 0);
      ObjectSet("header", OBJPROP_XDISTANCE, textXshift);
      ObjectSet("header", OBJPROP_YDISTANCE, textYshift);
      ObjectSetText("header", ":: trading-evolution.com ::", 10, "Arial", PreviousDayVolumeColor);


//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
int i;
  
   ObjectDelete("pdf1");
      
   ObjectDelete("pd1");
   ObjectDelete("pd2");
   ObjectDelete("pd3");

   ObjectDelete("dbpd1");
   ObjectDelete("dbpd2");
   ObjectDelete("dbpd3");
   
   ObjectDelete("tw1");
   ObjectDelete("tw2");
   ObjectDelete("tw3");

   ObjectDelete("pw1");
   ObjectDelete("pw2");
   ObjectDelete("pw3");

   ObjectDelete("cv1");
   ObjectDelete("cv2");
   ObjectDelete("cv3");
  
   ObjectDelete("spd");
   ObjectDelete("sdbpd");
   ObjectDelete("stw");
   ObjectDelete("spw");
   ObjectDelete("sc");
   ObjectDelete("header");
   
 for (i=1;i<=clevel1count;i++)
 if (ObjectFind("clevel1"+i) == 0){
      ObjectDelete("clevel1"+i);

 }
 
for (i=1;i<=clevel2count;i++)
 if (ObjectFind("clevel2"+i) == 0){
 ObjectDelete("clevel2"+i);
 } 
 
   ObjectDelete( "nyl" );
   ObjectDelete( "nyt" );
    
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
//----



//----------------- evolution

  if (soundAlert==True){
   if ((Ask == StrToDouble(varray[5])) || (Ask == StrToDouble(varray[7])) || (Ask == StrToDouble(varray[9])) || (Ask == StrToDouble(varray[14])) || (Ask == StrToDouble(varray[16])) || (Ask == StrToDouble(varray[18])) || (Ask == StrToDouble(varray[25]))|| (Ask == StrToDouble(varray[27]))|| (Ask == StrToDouble(varray[29])) || (Ask == StrToDouble(varray[34])) || (Ask == StrToDouble(varray[36])) || (Ask == StrToDouble(varray[38])))
   {
      PlaySound("alert.wav");
   }
   }

   return(0);
   
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+


//-----


void drawLine(string name, string vol, string mydate, double price1, color col, int style, bool rayflag, int width)
{  

string time1="20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 00:00";
string time2=TimeToStr(StrToTime("20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 00:00")+266400);
if (TimeDayOfWeek(StrToTime(time2))==1) time2=TimeToStr(StrToTime(time2)+172800);
else if (TimeDayOfWeek(StrToTime(time2))==0) time2=TimeToStr(StrToTime(time2)+172800);



    if (ObjectFind(name) != 0) {
     ObjectDelete(name);
    } 
   //Print(time1);
   ObjectCreate(name, OBJ_TREND, 0, StrToTime(time1), price1+LevelsVerticalShift, StrToTime(time2), price1+LevelsVerticalShift);
	ObjectSet(name, OBJPROP_COLOR, col);
	ObjectSet(name, OBJPROP_BACK, false);
	ObjectSet(name, OBJPROP_STYLE,style);
   ObjectSet(name, OBJPROP_RAY, rayflag);
   ObjectSet(name, OBJPROP_WIDTH, width);
   ObjectSetText(name,"Vol="+vol,10);
 
           
}

void drawHLine(string name, string vol, string mydate, double price1, color col, int style, int width)
{  

string time1="20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 00:00";

    if (ObjectFind(name) != 0) {
     ObjectDelete(name);
    } 

   ObjectCreate(name, OBJ_HLINE, 0, StrToTime(time1), price1+LevelsVerticalShift);
	ObjectSet(name, OBJPROP_COLOR, col);
	ObjectSet(name, OBJPROP_BACK, false);
	ObjectSet(name, OBJPROP_STYLE,style);
   ObjectSet(name, OBJPROP_WIDTH, width);
   ObjectSetText(name,"Vol="+vol,10);
 

           
}
 

Bullra

Новичок
eVOLutin-histogram. Гистограмма объемов

eurusd-m30-roboforex.png


Индикатор который рисует гистограмму объемов для:
- предыдущего торгового дня
- поза-предыдущего
- текущей недели
- прошлой недели
- контракт


PHP:
#property copyright "�2009-2010, trading-evolution.com , olegf0x , someBody edition"
#property  link  "http://trading-evolution.com/"
#property indicator_chart_window 




extern double PercentageDistribution = 30;
extern double HistogramVerticalShift = 0;
extern string FileNamePruductCode  = "";

extern bool ShowDayBack=TRUE;
extern double  DayBack_zoom = 14;

extern bool ShowTwoDayBack=TRUE;
extern double TwoDayBack_zoom = 14;
extern bool ShowWeek=TRUE;
extern double Week_zoom = 14;
extern bool ShowWeekBack=TRUE;
extern double WeekBack_zoom = 14;
extern bool ShowContract=TRUE;
extern double Contract_zoom = 2;

extern color DayBackExt = Lime;
extern color DayBack = MediumSeaGreen;
extern color TwoDayBack = DarkGreen;
extern color TwoDayBackExt = Green;
extern color ThisWeek = SteelBlue;
extern color ThisWeekExt = DodgerBlue;
extern color WeekBack = Navy;
extern color WeekBackExt = Blue;
extern color Contract = Brown;
extern color ContractExt = Red;


// -----------------------------------------------------------------------------------------------------------------------------
string folder = "/evolution-histogram/";
int control;
string currency,currency1;
bool cur=TRUE,cross=FALSE;
double previosday[1][2],prepreviosday[1][2],thisweek[1][2],previosweek[1][2],contract[1][2];
double DayBack_extvolume,TwoDayBack_extvolume,Week_extvolume,WeekBack_extvolume,Contract_extvolume;
int a,b,c,d,e,f,g;
string prefix ="eVOLution_hist\n",date1,date2,date3,date4,date5;
string prevday,prevprevday,week,prevweek;

// -----------------------------------------------------------------------------------------------------------------------------
int init() 
{
 inition();
}
// -----------------------------------------------------------------------------------------------------------------------------
int deinit() 
{ if(UninitializeReason()==1 ||UninitializeReason()==2 || UninitializeReason()==4 ||UninitializeReason()==5)
  {
   deinition();
  } 
} 

// -----------------------------------------------------------------------------------------------------------------------------
int start()
{  
   if(cur==FALSE){Alert("Currency is not supported");return(0);}
   color tempColor;
   int total = ObjectsTotal();
   int count = 0;

   string prefixline = prefix+">";
   for (int i = total - 1; i >= 0; i--)
   {
       string prefix1 = ObjectName(i);
      if (StringFind(prefix1,prefixline) == 0)
      {ObjectDelete(prefix1);count++;}			
	}
      if (PercentageDistribution>0)
      {
      DayBack_extvolume=previosday[ArrayMaximum(previosday)][0]*PercentageDistribution/100;
      TwoDayBack_extvolume=prepreviosday[ArrayMaximum(prepreviosday)][0]*PercentageDistribution/100;
      Week_extvolume=thisweek[ArrayMaximum(thisweek)][0]*PercentageDistribution/100;
      WeekBack_extvolume=previosweek[ArrayMaximum(previosweek)][0]*PercentageDistribution/100;
      Contract_extvolume=contract[ArrayMaximum(contract)][0]*PercentageDistribution/100;
      }
      
  
  
      
   for(a=0;a<ArrayRange(previosday,0);a++)
   {  
      if(ShowDayBack==TRUE )
      {

      if (previosday[a][0]>DayBack_extvolume) tempColor=DayBackExt;
      else tempColor=DayBack;
      drawLine(prefixline+prevday+"\nVol: "+DoubleToStr(previosday[a][0],0),ObjectGet(prefix+"day back ",OBJPROP_TIME1) ,previosday[a][1],ObjectGet(prefix+"day back ",OBJPROP_TIME1)+previosday[a][0]*DayBack_zoom, tempColor);
      
      }
   
   }
   for(a=0;a<ArrayRange(prepreviosday,0);a++)
   {  
      if(ShowTwoDayBack==TRUE )
      {
      if (prepreviosday[a][0]>TwoDayBack_extvolume) tempColor=TwoDayBackExt;
      else tempColor=TwoDayBack;
      drawLine(prefixline+prevprevday+"\nVol: "+DoubleToStr(prepreviosday[a][0],0),ObjectGet(prefix+"two day back",OBJPROP_TIME1) ,prepreviosday[a][1],ObjectGet(prefix+"two day back",OBJPROP_TIME1)+prepreviosday[a][0]*TwoDayBack_zoom, tempColor);
      
      }
   
   }
   for(a=0;a<ArrayRange(thisweek,0);a++)
   {
      if(ShowWeek==TRUE )
      {
      if (thisweek[a][0]>Week_extvolume) tempColor=ThisWeekExt;
      else tempColor=ThisWeek;
      
      drawLine(prefixline+TimeToStr(StrToTime(week)+PERIOD_D1*60*1,TIME_DATE)+"-"+TimeToStr(StrToTime(week)+PERIOD_D1*60*6,TIME_DATE)+"\nVol: "+DoubleToStr(thisweek[a][0],0),ObjectGet(prefix+"this week",OBJPROP_TIME1) ,thisweek[a][1],ObjectGet(prefix+"this week",OBJPROP_TIME1)+thisweek[a][0]*Week_zoom, tempColor);}
   
   }
   for(a=0;a<ArrayRange(previosweek,0);a++)
   {
      if(ShowWeekBack==TRUE )
      {
      if (previosweek[a][0]>WeekBack_extvolume) tempColor=WeekBackExt;
      else tempColor=WeekBack;
      drawLine(prefixline+TimeToStr(StrToTime(prevweek)+PERIOD_D1*60*1,TIME_DATE)+"-"+TimeToStr(StrToTime(prevweek)+PERIOD_D1*60*6,TIME_DATE)+"\nVol: "+DoubleToStr(previosweek[a][0],0),ObjectGet(prefix+"week back",OBJPROP_TIME1) ,previosweek[a][1],ObjectGet(prefix+"week back",OBJPROP_TIME1)+previosweek[a][0]*WeekBack_zoom, tempColor);}
   
   }
   int bars_count=WindowBarsPerChart()-WindowFirstVisibleBar();
   datetime time = Time[0]+Period()*60*bars_count;
   for(a=0;a<ArrayRange(contract,0);a++)
   {  
      if(ShowContract==TRUE )
      {
      
      if (contract[a][0]>Contract_extvolume) tempColor=ContractExt;
      else tempColor=Contract;
      
      drawLine(prefixline+"CONTRACT\nVol: "+DoubleToStr(contract[a][0],0), time ,contract[a][1],time-contract[a][0]*Contract_zoom, tempColor);}
   
   }
   
      
     
      
      
    
}



void drawLine(string name, datetime time1, double price1, datetime time2, color ����)
{  
   ObjectCreate(name, OBJ_TREND, 0, time1, price1+HistogramVerticalShift, time2, price1+HistogramVerticalShift);
	ObjectSet(name, OBJPROP_COLOR, ����);
	ObjectSet(name, OBJPROP_BACK, true);
	ObjectSet(name, OBJPROP_STYLE,0);
   ObjectSet(name, OBJPROP_RAY, false);
   ObjectSet(name, OBJPROP_WIDTH, 3);
   
      
}




int Explode(string str, string levelrun, string& arr[])
{
   int i = 0;
   int po = (StringFind(str, levelrun));
   while(po != -1)
   {  
      if(po == 0) arr[i] = "0"; else arr[i] = StringSubstr(str, 0, po);
      i++;
      str = StringSubstr(str, po+StringLen(levelrun));
      po = StringFind(str, levelrun);
      if(po == -1 || str == "0") break;
   }
   arr[i] = str;

   return(i+1);
}



void inition()
{  

   if (FileNamePruductCode =="") {   
   currency =StringSubstr( Symbol(),0,2);
   currency1 = StringSubstr( Symbol(),0,6);
   if(currency =="6E" || currency1 =="EURUSD")
   {currency = "ec";}
   else if(currency =="6B" || currency1=="GBPUSD")
   {currency = "bp";}
   else if(currency =="ES" || currency1 =="S&P_50")
   {currency = "es";}
   else if(currency=="6J" || currency1=="USDJPY")
   {currency ="j1";}
   else if(currency == "6A" || currency1 == "AUDUSD")
   {currency ="ad";}
   else if(currency == "GC" || currency1 == "GOLD")
   {currency ="gc";}
   else if(currency == "6S" || currency1 =="USDCHF")
   {currency ="e1";}
   else if(currency == "6C" || currency1 =="USDCAD")
   {currency ="c1";}
   else{cur=FALSE;return(0);}
   
   }
   else currency=FileNamePruductCode ;
   
   
   string temp[10000],asd[4];
   int FileHandler = FileOpen( folder+"futuresvolume-"+currency+".csv", FILE_BIN|FILE_READ);
   if(FileHandler <0){
   if (GetLastError() == 4103/* CANNOT_OPEN_FILE */) Alert("No such file ");
      else Alert("Error opening file ");
      return (0);} 
   a= FileReadArray(FileHandler, temp, 0,10000); 
   if (a<1) {Alert("Error opening file ");return(0);}
   FileClose(FileHandler);
   ArrayResize(temp,a);
   Explode(temp[0],",",asd);
   control = StrToInteger(asd[2]);
   if(GlobalVariableGet(Symbol()+"_"+currency) != control){deinition();}
   
   prevday =TimeToStr( iTime(Symbol(),PERIOD_D1,1) ,TIME_DATE);
   prevprevday=TimeToStr(iTime(Symbol(),PERIOD_D1,2),TIME_DATE);
   week=TimeToStr(iTime(Symbol(),PERIOD_W1,0),TIME_DATE);
   prevweek =TimeToStr(iTime(Symbol(),PERIOD_W1,1),TIME_DATE);
   for(b=1;b<a;b++)
   { 
      Explode(temp[b],",",asd);
      if(StringLen(asd[1])==6)
      {
         if(prevday==("20"+StringSubstr(asd[1],0,2)+"."+StringSubstr(asd[1],2,2)+"."+StringSubstr(asd[1],4,2))&& StrToDouble(asd[3])>0)
         {  
            previosday[c][0]=StrToDouble(asd[2]);
            previosday[c][1]=StrToDouble(asd[3]);
            if(currency1 =="USDJPY")
            {previosday[c][1]=1/previosday[c][1] *100;}
            if(currency1 == "USDCAD")
            {previosday[c][1]=1/previosday[c][1];}
            if(currency1 == "USDCHF")
            {previosday[c][1]=1/previosday[c][1];}            
            
            c++;ArrayResize(previosday,c+1);
            continue;
         }
         if(prevprevday==("20"+StringSubstr(asd[1],0,2)+"."+StringSubstr(asd[1],2,2)+"."+StringSubstr(asd[1],4,2))&&StrToDouble(asd[3])>0)
         {
            prepreviosday[d][0]=StrToDouble(asd[2]);
            prepreviosday[d][1]=StrToDouble(asd[3]);
            if(currency1 =="USDJPY")
            {prepreviosday[d][1]=1/prepreviosday[d][1] *100;}
            if(currency1 == "USDCAD")
            {prepreviosday[d][1]=1/prepreviosday[d][1];}
            if(currency1 == "USDCHF")
            {prepreviosday[d][1]=1/prepreviosday[d][1];}
            
            
            d++;ArrayResize(prepreviosday,d+1);
            continue;
         }
      }
      if(StringLen(asd[1])==13)
      {
         if(week==("20"+StringSubstr(asd[1],0,2)+"."+StringSubstr(asd[1],2,2)+"."+StringSubstr(asd[1],4,2))&&StrToDouble(asd[3])>0)
         {
            thisweek[e][0]=StrToDouble(asd[2]);
            thisweek[e][1]=StrToDouble(asd[3]);
            if(currency1 =="USDJPY")
            {thisweek[e][1]=1/thisweek[e][1] *100;}
            if(currency1 == "USDCAD")
            {thisweek[e][1]=1/thisweek[e][1];}
            if(currency1 == "USDCHF")
            {thisweek[e][1]=1/thisweek[e][1];}
            
           
            e++;ArrayResize(thisweek,e+1);
            continue;
         }
         if(prevweek==("20"+StringSubstr(asd[1],0,2)+"."+StringSubstr(asd[1],2,2)+"."+StringSubstr(asd[1],4,2))&&StrToDouble(asd[3])>0)
         {
            previosweek[f][0]=StrToDouble(asd[2]);
            previosweek[f][1]=StrToDouble(asd[3]);
            if(currency1 =="USDJPY")
            {previosweek[f][1]=1/previosweek[f][1] *100;}
            if(currency1 == "USDCAD")
            {previosweek[f][1]=1/previosweek[f][1];}
            if(currency1 == "USDCHF")
            {previosweek[f][1]=1/previosweek[f][1];}
            
            
            f++;ArrayResize(previosweek,f+1);continue;
         }
      }
      
      if(asd[1]=="contract_period"&& StrToDouble(asd[3])>0)
      {
         contract[g][0]=StrToDouble(asd[2]);
         contract[g][1]=StrToDouble(asd[3]);
         if(currency1 =="USDJPY")
         {contract[g][1]=1/contract[g][1] *100;}
         if(currency1 == "USDCAD")
         {contract[g][1]=1/contract[g][1];}
         if(currency1 == "USDCHF")
         {contract[g][1]=1/contract[g][1];}
            
         
         g++;ArrayResize(contract,g+1);
      }
   }
   
  if(ShowDayBack==TRUE && ObjectFind(prefix+"day back ") == -1){
   string name = prefix+"day back ";     
   ObjectCreate(name,OBJ_VLINE,0,StrToTime(prevday),0);
   ObjectSet(name,OBJPROP_STYLE,1);
   ObjectSet(name,OBJPROP_COLOR,DayBack);}
   if(ShowTwoDayBack==TRUE && ObjectFind(prefix+"two day back")== -1 ){
   name = prefix+"two day back";
   ObjectCreate(name,OBJ_VLINE,0,StrToTime(prevprevday),0);
   ObjectSet(name,OBJPROP_STYLE,1);
   ObjectSet(name,OBJPROP_COLOR,TwoDayBack);}
   if(ShowWeek==TRUE && ObjectFind(prefix+"this week")== -1){
   name = prefix+"this week";
   ObjectCreate(name,OBJ_VLINE,0,StrToTime(week)+PERIOD_D1*60,0);
   ObjectSet(name,OBJPROP_STYLE,1);
   ObjectSet(name,OBJPROP_COLOR,ThisWeek);}
   if(ShowWeekBack==TRUE && ObjectFind(prefix+"week back")== -1){
   name = prefix +"week back";
   ObjectCreate(name,OBJ_VLINE,0,StrToTime(prevweek)+PERIOD_D1*60,0);
   ObjectSet(name,OBJPROP_STYLE,1);
   ObjectSet(name,OBJPROP_COLOR,WeekBack);}
  
 GlobalVariableSet(Symbol()+"_"+currency,control);
} 

void deinition()
{
   GlobalVariableDel(Symbol()+"_"+currency);
   int total = ObjectsTotal();
   int count = 0;
   string prefixline = prefix;
   for (int i = total - 1; i >= 0; i--)
   {
       string prefix1 = ObjectName(i);
      if (StringFind(prefix1,prefixline) == 0)
      {ObjectDelete(prefix1);count++;}			
	}
}
// -----------------------------------------------------------------------------------------------------------------------------
 

Bullra

Новичок
eVOLution-dvoid. реальные объемы и открытый интерес

eurusd-d1-roboforex-2.png


Поддерживаемые продукты - все доступные во флеш апплете, а это:
  1. EURUSD
  2. GBPUSD
  3. USDJPY
  4. AUDUSD
  5. USDCHF
  6. USDCAD
  7. NZDUSD
  8. EURJPY
  9. S&P500
  10. DowJones
  11. Nasdaq
  12. Gold
  13. Silver
  14. CrudeOil
  15. Wheat
  16. Corn
  17. Soybeans

PHP:
//+------------------------------------------------------------------+
//|                                              eVOLution-dvoid.mq4 |
//|                                                   2012, someBody |
//|                                    http://trading-evolution.com/ |
//+------------------------------------------------------------------+
#property copyright " 2012, someBody"
#property link      "http://trading-evolution.com/"

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 105
#property  indicator_color1  Silver

extern string FileNamePruductCode  = "";
extern int barsToProcess=100;
extern color barColor = SteelBlue, oiColor=Yellow;
extern bool showOI = true;
extern bool showHeader = true;
extern color HeaderColor=Lime;
extern int FontSize = 8;
extern int textXshift = 10;
extern int textYshift = 13;



string folder = "/evolution-dvoid/",objpref="evo-dvoid_";
int control, vol0, oi0, vol1, oi1;
string currency,currency1, date0, date1,headertext1,headertext2;
bool cur=TRUE,cross=FALSE;
int a,b,objwidth=4;
double tempvol,tempoi,volmax,volmin,volrange,oimax,oimin,oirange;

string ddate;
double volarr[], oiarr[];

bool initFinished=false;
color back_ground;
int windowIndex;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  

initFinished=false;

//----

   return(0);
}
  
  
void drawRectangle(string name, datetime time1, double price1, datetime time2, int counter)
{  

string oiname;

  
   windowIndex=WindowFind("trading-evolution.com : eVOLution-dvoid");
   
  
   
   oiname=objpref+"_oi_"+name;
   name=objpref+"_vol_"+name;
   
   if (Period()<1440)
   ObjectCreate(name, OBJ_RECTANGLE, windowIndex, time1, price1, time2, volarr[counter]*100/volmax);
   else
   ObjectCreate(name, OBJ_TREND, windowIndex, time1, price1, time1, volarr[counter]*100/volmax);
   
	ObjectSet(name, OBJPROP_COLOR, barColor);
	ObjectSet(name, OBJPROP_BACK, true);
	ObjectSet(name, OBJPROP_RAY, false);
	ObjectSet(name, OBJPROP_WIDTH,objwidth);
	ObjectSetText(name, "Volume="+DoubleToStr(volarr[counter],0));
	
	if (showOI)
	{
	  if (oiarr[counter+1]>1 && oirange>0)
	  //ObjectCreate(oiname,OBJ_TREND,windowIndex,time1-10,(oiarr[counter+1]-oimin)*100/oirange,time2,oiarr[counter]*100/oirange);
	  ObjectCreate(oiname,OBJ_TREND,windowIndex,time1-10,(oiarr[counter+1]-oimin)*100/oirange,time2,(oiarr[counter]-oimin)*100/oirange);
	  ObjectSet(oiname, OBJPROP_COLOR, oiColor);
	  ObjectSet(oiname, OBJPROP_BACK, false);
	  ObjectSet(oiname, OBJPROP_RAY, false);
	  ObjectSet(oiname, OBJPROP_WIDTH,2);
	  ObjectSetText(oiname, "OI="+DoubleToStr(oiarr[counter],0));
	}
	

}
   
   

int Explode(string str, string levelrun, string& arr[])
{
   int i = 0;
   int po = (StringFind(str, levelrun));
   while(po != -1)
   {  
      if(po == 0) arr[i] = "0"; else arr[i] = StringSubstr(str, 0, po);
      i++;
      str = StringSubstr(str, po+StringLen(levelrun));
      po = StringFind(str, levelrun);
      if(po == -1 || str == "0") break;
   }
   arr[i] = str;

   return(i+1);
}

//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   deinition();
//----
   return(0);
  }

void deinition()
{

int total = ObjectsTotal();
   int count = 0;
   string prefixline = objpref;
   for (int i = total - 1; i >= 0; i--)
   {
      string prefix1 = ObjectName(i);
      if (StringFind(prefix1,prefixline) == 0)
      {ObjectDelete(prefix1);count++;}
	}
	   
}

void drawonce()
{

   int    counted_bars=IndicatorCounted();
   string voldiff,oidiff;

//----
   
   if (!initFinished)
   {
   
   
   IndicatorShortName("trading-evolution.com : eVOLution-dvoid");
   
   
   
   if(cur==FALSE){Alert("Currency is not supported");return(0);}
   color tempColor;
   int total = ObjectsTotal();
   int count = 0;
      
   //product list from database: -EC -J1 -AD -BP -C1 -RY -NE -E1 -YM -NQ -ES -ZW -ZS -ZC -CL -SI -GC
   if (FileNamePruductCode =="") {   
   currency =StringSubstr( Symbol(),0,2);
   currency1 = StringSubstr( Symbol(),0,6);
   if(currency =="6E" || currency1 =="EURUSD")
   {currency = "ec";}
   else if(currency =="6B" || currency1=="GBPUSD")
   {currency = "bp";}
   else if(currency =="ES" || currency1 =="S&P_50")
   {currency = "es";}
   else if(currency == "NQ" || currency1 == "Nasdaq")
   {currency ="nq";}
   else if(currency == "YM" || currency1 == "DowJon")
   {currency ="ym";}
   else if(currency=="J1" || currency1=="USDJPY")
   {currency ="j1";}
   else if(currency == "AD" || currency1 == "AUDUSD")
   {currency ="ad";}
   else if(currency == "GC" || currency1 == "XAGUSD")
   {currency ="gc";}
   else if(currency == "SI" || currency1 == "XAUUSD")
   {currency ="si";}
   else if(currency == "CL" || currency1 == "_CL")
   {currency ="cl";}
   else if(currency == "6S" || currency1 =="USDCHF")
   {currency ="e1";}
   else if(currency == "6C" || currency1 =="USDCAD")
   {currency ="c1";}
   else if(currency == "6N" || currency1 =="NZDUSD")
   {currency ="ne";}
   else if(currency == "6R" || currency1 =="EURJPY")
   {currency ="ry";}
   else if(currency == "ZS" || currency1 =="_ZS")
   {currency ="zs";}
   else if(currency == "ZC" || currency1 =="_ZC")
   {currency ="zc";}
   else if(currency == "ZW" || currency1 =="_ZW")
   {currency ="zw";}
   else{cur=FALSE;return(0);}
   
   }
   else currency=FileNamePruductCode ;
   
   
   string temp[10000],asd[4];
   int FileHandler = FileOpen( folder+"dvoid-"+currency+".csv", FILE_BIN|FILE_READ);
   if(FileHandler <0){
   if (GetLastError() == 4103/* CANNOT_OPEN_FILE */) Alert("No such file ");
      else Alert("Error opening file ");
      return (0);} 
   a=FileReadArray(FileHandler, temp, 0,barsToProcess); 
   if (a<1) {Alert("Error opening file ");return(0);}
   FileClose(FileHandler);
   

   
   ArrayResize(temp,a);
   ArrayResize(volarr,a);
   ArrayResize(oiarr,a);

   if(GlobalVariableGet(Symbol()+"_"+currency) != control){deinition();}
   
   for(b=0;b<a;b++)
   { 
      Explode(temp[b],",",asd);
      volarr[b]=StrToInteger(asd[1]);
      oiarr[b]=StrToInteger(asd[2]);
      
   }
   
   //getting maximum value from array
   volmax=volarr[(ArrayMaximum(volarr))];
   volmin=volarr[(ArrayMinimum(volarr))];
   volrange=volmax-volmin;
   oimax=oiarr[(ArrayMaximum(oiarr))];
   oimin=oiarr[(ArrayMinimum(oiarr))];
   oirange=oimax-oimin;   
   
   for(b=0;b<a;b++)
   { 
      Explode(temp[b],",",asd);
      ddate=StringSubstr(asd[0],0,4)+"."+StringSubstr(asd[0],4,2)+"."+StringSubstr(asd[0],6,2);
      drawRectangle(ddate,StrToTime(ddate+" 00:00"),0,StrToTime(ddate+" 23:59"),b);
   }
   
//----- getting last two days data to display header text
      Explode(temp[0],",",asd);
      date0=StrToInteger(asd[0]);
      vol0=StrToInteger(asd[1]);
      oi0=StrToInteger(asd[2]);
      
      
      Explode(temp[1],",",asd);
      date1=StrToInteger(asd[0]);
      vol1=StrToInteger(asd[1]);
      oi1=StrToInteger(asd[2]);
      
      
      
 //---- displaying header here
 if (showHeader)
 {
      if (vol0>vol1)
      {
      voldiff = "+"+(vol0-vol1);
      } else voldiff = vol0-vol1;
      
      if (oi0>oi1)
      {
      oidiff = "+"+(oi0-oi1);
      } else oidiff = oi0-oi1;
      
      
      headertext1=date0+" V="+vol0+" OI="+oi0+" : Vol-D= "+voldiff+" OI-D= "+oidiff;
      headertext2=date1+" V="+vol1+" OI="+oi1;
      
      windowIndex=WindowFind("trading-evolution.com : eVOLution-dvoid");
      
      string headername0=objpref+"header0";
      string headername1=objpref+"header1";
      
      ObjectCreate(headername0, OBJ_LABEL, windowIndex, 0, 0, 0, 0);
      ObjectSet(headername0, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(headername0, OBJPROP_YDISTANCE, textYshift);
      ObjectSetText(headername0, headertext1, FontSize, "Arial", HeaderColor);

      ObjectCreate(headername1, OBJ_LABEL, windowIndex, 0, 0, 0, 0);
      ObjectSet(headername1, OBJPROP_XDISTANCE, textXshift);
      ObjectSet(headername1, OBJPROP_YDISTANCE, FontSize*1.6+textYshift);
      ObjectSetText(headername1, headertext2, FontSize, "Arial", HeaderColor);
}
   
//----
   initFinished=true;
   WindowRedraw();
   }


}



//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   drawonce();
   WindowRedraw();
   return(0);
  }
//+------------------------------------------------------------------+
 

Bullra

Новичок
eVOLution-options. Опционные уровни

eurusd-m15-roboforex.png


Индикатор рисует опционные уровни.

Поддерживаемые продукты:
  1. 6A - AUDUSD
  2. 6B - GBPUSD
  3. 6C - CADUSD
  4. 6E - EURUSD
  5. 6J - JPYUSD (USDJPY)
  6. 6S - CHFUSD (USDCHF)
  7. ES - E-Mini S&P 500
  8. GC - Gold
  9. SI - Silver
  10. CL - Crude Light Oil

PHP:
//+------------------------------------------------------------------+
//|                                             eVOLution-levels.mq4 |
//|                Copyright � 2010, someBody, trading-evolution.com |
//|                                 http://www.trading-evolution.com |
//+------------------------------------------------------------------+
#property copyright "Copyright � 2009-2010, someBody, trading-evolution.com"
#property link      "http://www.trading-evolution.com"

#property indicator_chart_window
#property indicator_buffers 1

#import

extern int NumberOfDaysBackToShow = 10;
extern double LevelsVerticalShift = 0;
extern string FileNamePruductCode  = "";
extern string separator = "-------------";
extern bool HideForLongTimeframe = True;
extern bool ReverseDataFromFile = False;
extern bool ShowKeyZone = True;
extern bool ShowMajorLevels = True;
extern bool ShowMajorCALLLevels = True;
extern bool ShowMajorPUTLevels = True;
extern color KeyZonePositiveColor = SteelBlue;
extern color KeyZoneNegativeColor = Yellow;
extern color KeyZoneArrowColor = White;
extern color MajorCALLColor = Green;
extern color MajorPUTColor = Red;
extern color MajorLevelsColor = Gainsboro;
extern int MajorCALLStyle=0;
extern int MajorPUTStyle=0;



int FirstLevelWidth=1;
int correction=1;

string varray[50];
string currency,currency1;
string curmonth,nextmonth,curdate,curyear,nextyear;
bool cur,reverse;
int clevel1count,clevel2count,arrowcode;
color KeyZoneColor;

//---- input parameters
int          corner=0;




double ExtMapBuffer1[];
  
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- checking if timeframe is begger than 1hour, if so - drow nothing
if (HideForLongTimeframe && Period()>60)
{
   return(0);
}

//---- indicators
   cur=TRUE;
   NumberOfDaysBackToShow=NumberOfDaysBackToShow+1;
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   

//---- trying to indentify what file to load based on symbol
   currency =StringSubstr( Symbol(),0,2);
   currency1 = StringSubstr( Symbol(),0,6);
   
   if(currency=="6E" || currency1=="EURUSD")
   {currency = "ec";
   reverse=false;}
   else if(currency =="6B" || currency1=="GBPUSD")
   {currency = "bp";
   reverse=false;}
   else if(currency=="6J")
   {currency ="jy";
   reverse=false;}
   else if (currency1=="USDJPY")
   {currency ="jy";
   reverse=true;
   correction=100;}
   else if(currency == "6A" || currency1 == "AUDUSD")
   {currency ="ad";
   reverse=false;}
   else if(currency=="GC" || currency1=="XAU")
   {currency = "gc";
   reverse=false;}
   else if(currency=="SI" || currency1=="XAG")
   {currency = "si";
   reverse=false;}
   else if(currency=="CL")
   {currency = "cl";
   reverse=false;}
   else if(currency == "6C")
   {currency ="cd";
   reverse=false;}
   else if (currency1 =="USDCAD")
   {currency ="cd";
   reverse=true;
   correction=1;}
   else if(currency =="ES" || currency1 =="S&P_50")
   {currency = "es";
   reverse=false;}
   else if(StringLen(FileNamePruductCode )>1)
   {currency = FileNamePruductCode ;
   cur=true;
      if (ReverseDataFromFile==true)reverse=true;
      else reverse = false;
   }
   else{cur=FALSE;return(0);}





Print ("symbol_code is "+currency);



if(cur==FALSE){Alert("Product not recognized.");return(0);}



//----
   string filename,filename2, buff_str = "";
   int shft, handle,handle2, height, pointer, j, m;
   shft=10;
   int weekendshift=0;






for (j=0;j<NumberOfDaysBackToShow;j++)
{
m=TimeCurrent()-86400*j-86400*weekendshift;
//---- getting date data


if (TimeDayOfWeek(m)==0)
{weekendshift=2;
m=TimeCurrent()-86400*j-86400*weekendshift;}

else if (TimeDayOfWeek(m)==6)
{weekendshift=1;
m=TimeCurrent()-86400*j-86400*weekendshift;
}


if (TimeDay(m)<10){
curdate="0"+TimeDay(m);
}
else
{
curdate=TimeDay(m);
}

curyear=TimeYear(m);
nextyear=curyear;

if (TimeMonth(m)<10)
{curmonth="0"+TimeMonth(m);}
else
{curmonth=TimeMonth(m);}

if (TimeMonth(m)<=8)
{nextmonth="0"+(TimeMonth(m)+1);}
else if (TimeMonth(m)<12 && TimeMonth(m)>8)
{nextmonth=(TimeMonth(m)+1);}
else
{nextmonth="01";
nextyear=StrToInteger(curyear)+1;
}

curyear=StringSubstr(curyear,2,2);
nextyear=StringSubstr(nextyear,2,2);


//---- loading file

   filename = "/evolution-options/ol-"+curyear+curmonth+curdate+"-"+currency+"-"+curyear+curmonth+".csv";
   Print ("---> Filename "+filename);
   handle=FileOpen(filename, FILE_CSV|FILE_READ,",");
   
   //current month file opening problem
   if(handle<0)    
      {
      if(GetLastError()==4103)         
         {
         Print("No such file "+filename+" , trying next month contract period");
         filename = "/evolution-options/ol-"+curyear+curmonth+curdate+"-"+currency+"-"+nextyear+nextmonth+".csv";
         handle=FileOpen(filename, FILE_CSV|FILE_READ,",");
         Print (filename);
         
         
         //next month file opening problem
         if(handle<0)
            {
            if(GetLastError()==4103)
               {
               //Print("No such file "+filename);
               continue;
               }
            else                         
               {Print("Error opening file ");}
            }
      }
      else                       
         {Print("Error opening file ");}
     }
     
    
    int i=0;
     while ( !FileIsEnding(handle))
      {
      varray[i] = FileReadString(handle);
      i++;
      }

      FileClose( handle );


Print ("Go for it "+varray[0]);

//---------------------------------------------------------------

if (!reverse){

   if (varray[1]<varray[2])
   KeyZoneColor=KeyZonePositiveColor;
   else
   KeyZoneColor=KeyZoneNegativeColor;}
else
{
   if (varray[1]<varray[2])
   KeyZoneColor=KeyZoneNegativeColor;
   else
   KeyZoneColor=KeyZonePositiveColor;
}

if (KeyZoneColor==KeyZonePositiveColor)
   arrowcode=241;
else
   arrowcode=242;
   


if (ShowKeyZone){
  drawArea("keyzone-"+j, varray[0] , StrToDouble(varray[1]) ,  StrToDouble(varray[2]), KeyZoneColor,0,0,FirstLevelWidth);

  }
  
if (ShowMajorLevels){
  drawLine("major1-"+j, "nothing" , varray[0] , StrToDouble(varray[3]), MajorLevelsColor,0,0,FirstLevelWidth);
  drawLine("major2-"+j, "nothing" , varray[0] , StrToDouble(varray[4]), MajorLevelsColor,0,0,FirstLevelWidth);
  }
if (ShowMajorCALLLevels){
  drawLine("call1-"+j, "nothing" , varray[0] , StrToDouble(varray[5]), MajorCALLColor,MajorCALLStyle,0,FirstLevelWidth);
  drawLine("call2-"+j, "nothing" , varray[0] , StrToDouble(varray[6]), MajorCALLColor,MajorCALLStyle,0,FirstLevelWidth);
  drawLine("call3-"+j, "nothing" , varray[0] , StrToDouble(varray[7]), MajorCALLColor,MajorCALLStyle,0,FirstLevelWidth);
  }
if (ShowMajorPUTLevels){
  drawLine("put1-"+j, "nothing" , varray[0] , StrToDouble(varray[8]), MajorPUTColor,MajorPUTStyle,0,FirstLevelWidth);
  drawLine("put2-"+j, "nothing" , varray[0] , StrToDouble(varray[9]), MajorPUTColor,MajorPUTStyle,0,FirstLevelWidth);
  drawLine("put3-"+j, "nothing" , varray[0] , StrToDouble(varray[10]), MajorPUTColor,MajorPUTStyle,0,FirstLevelWidth);
  }

}
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
  int k;
      
for (k=0;k<NumberOfDaysBackToShow;k++){   
   ObjectDelete("keyzone-"+k);
   ObjectDelete("keyzone-"+k+"arrow");
   ObjectDelete("major1-"+k);
   ObjectDelete("major2-"+k);
   ObjectDelete("call1-"+k);
   ObjectDelete("call2-"+k);
   ObjectDelete("call3-"+k);
   ObjectDelete("put1-"+k);
   ObjectDelete("put2-"+k);
   ObjectDelete("put3-"+k);
   
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
//----


   return(0);
   
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+


//-----


void drawLine(string name, string dummy, string mydate, double price1, color col, int style, bool rayflag, int width)
{  


string time1=TimeToStr(StrToTime("20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 23:59"));
string time2=TimeToStr(StrToTime("20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 23:59")+86400);


if (TimeDayOfWeek(StrToTime(time1))==0) time1=TimeToStr(StrToTime(time1)+86400);
else if (TimeDayOfWeek(StrToTime(time1))==6) time1=TimeToStr(StrToTime(time1)+86400+86400);

if (TimeDayOfWeek(StrToTime(time2))==0) time2=TimeToStr(StrToTime(time2)+86400);
else if (TimeDayOfWeek(StrToTime(time2))==6) time2=TimeToStr(StrToTime(time2)+86400+86400);

if (reverse==true){
price1=correction*1/price1;



}

    if (ObjectFind(name) != 0) {
     ObjectDelete(name);
    } 
   ObjectCreate(name, OBJ_TREND, 0, StrToTime(time1), price1+LevelsVerticalShift, StrToTime(time2), price1+LevelsVerticalShift);
	ObjectSet(name, OBJPROP_COLOR, col);
	ObjectSet(name, OBJPROP_BACK, false);
	ObjectSet(name, OBJPROP_STYLE,style);
   ObjectSet(name, OBJPROP_RAY, rayflag);
   ObjectSet(name, OBJPROP_WIDTH, width);
           
}




void drawArea(string name, string mydate, double price1, double price2, color col, int style, bool rayflag, int width)
{  


string time1=TimeToStr(StrToTime("20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 23:59"));
string time2=TimeToStr(StrToTime("20"+StringSubstr(mydate, 0, 2)+"."+StringSubstr(mydate, 2, 2)+"."+StringSubstr(mydate, 4, 2)+" 23:59")+86400);

if (TimeDayOfWeek(StrToTime(time1))==0) time1=TimeToStr(StrToTime(time1)+86400);
else if (TimeDayOfWeek(StrToTime(time1))==6) time1=TimeToStr(StrToTime(time1)+86400+86400);

if (TimeDayOfWeek(StrToTime(time2))==0) time2=TimeToStr(StrToTime(time2)+86400);
else if (TimeDayOfWeek(StrToTime(time2))==6) time2=TimeToStr(StrToTime(time2)+86400+86400);

if (reverse==true){
price1=correction*1/price1;
price2=correction*1/price2;
}

    if (ObjectFind(name) != 0) {
     ObjectDelete(name);
    } 

   ObjectCreate(name, OBJ_RECTANGLE, 0, StrToTime(time1), price1+LevelsVerticalShift, StrToTime(time2), price2+LevelsVerticalShift);
	ObjectSet(name, OBJPROP_COLOR, col);
	ObjectSet(name, OBJPROP_BACK, true);
	ObjectSet(name, OBJPROP_WIDTH, width);
   ObjectSetText(name,"price2="+price2,10);
   
   ObjectCreate(name+"arrow",OBJ_ARROW,0,StrToTime(time1)+30,price1+LevelsVerticalShift);
   ObjectSet(name+"arrow",OBJPROP_ARROWCODE,arrowcode);
   ObjectSet(name+"arrow",OBJPROP_COLOR,KeyZoneArrowColor);
 
           
}
 

hansigomoto

Прохожий
Приветствую.
Как думаете реально найти индикатор показывающий Cumulative Delta в MT4, только не с сервиса Кластер Дельта?
 

Bullra

Новичок
Приветствую.
Как думаете реально найти индикатор показывающий Cumulative Delta в MT4, только не с сервиса Кластер Дельта?

Привет, вряд ли. Кумулятивную я нигде не встречал. Вроде есть в Marketdelta, более продвинутая, но там демо период всего две недели. Единственный вариант, это написать индикатор на тиковых объемах.
 

hansigomoto

Прохожий
Спасибо за ответ.
Вот попался индикатор обьема, я так понял берет данные с фьчерсов, но у меня не получилось заставить его работать, может кому пригодится. ( _http://codebase.mql4.com/ru/8946
 

olegvol

Новичок форума
Спасибо за ответ.
Вот попался индикатор обьема, я так понял берет данные с фьчерсов, но у меня не получилось заставить его работать, может кому пригодится. ( _http://codebase.mql4.com/ru/8946

Индикатор прекрасно пашет. Проблема в том что он работает в полном режиме 1 месяц в терминале от арсенал фх. А потом с 15 минутным запозданьем .
А так он платный и стоит 85 баксов - подписка в месяц. И в терминале арсенала.
У других дилингов лишь демо.
 

sarmat237

Прохожий
Пожалуйста поделитесь информацией по поводу реальной работы индикатора BARACUDE VOLUME . В сети нет никаких отзывов кроме как на сайте разработчика. Очень агрессивная реклама и картинки отличные, но нет никакого мониторинга счетов.
 

Bullra

Новичок
Давненько ничего не выкладывал, попалась мне на глаза вот такая веселая приколюха.
Пожалуй, тому, кто интересуется темой, будет полезно изучить материал в архиве.
gbpusd-arm-m1-armada-markets.png
 

Вложения

  • Volume X Indicator.rar
    522,3 КБ · Просмотры: 1 053
Верх