Закомментарьте вы распринтовку просто. Для себя сегодня писал функцию удаления объекта по имени:
Спасибо получилось
Закомментарьте вы распринтовку просто. Для себя сегодня писал функцию удаления объекта по имени:
//-------------------------------Внутренние------------------------------------------
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +11 , 0.000 );
ObjectSetFiboDescription(NameObjFibo , 11 , " (1) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +12 , 0.1 );
ObjectSetFiboDescription(NameObjFibo , 12 , " (%$) " );
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +13 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 13 , " (//) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +14 , 0.45 );
ObjectSetFiboDescription(NameObjFibo , 14 , " //// " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +15 , 0.500 );
ObjectSetFiboDescription(NameObjFibo , 15 , " (%$) " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +16 , 0.55 );
ObjectSetFiboDescription(NameObjFibo , 16 , " //// " );
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +17 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 18 , " (//) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +18 , 0.9 );
ObjectSetFiboDescription(NameObjFibo , 18 , " (%$) " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +19 , 1.000 );
ObjectSetFiboDescription(NameObjFibo , 19 , " Прямые (1) (%$) " );
//---------------------------------Нижние---------------------------------------------
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +20 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 20 , " (//) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +21 , 1.4950 );
ObjectSetFiboDescription(NameObjFibo , 21 , " Четверть " );
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +22 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 22 , " (//) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +23 , 1.890 );
ObjectSetFiboDescription(NameObjFibo , 23 , " (2)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +24 , 1.990 );
ObjectSetFiboDescription(NameObjFibo , 24 , " (2) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +25 , 2.480 );
ObjectSetFiboDescription(NameObjFibo , 25 , " Четверть " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +26 , 2.869 );
ObjectSetFiboDescription(NameObjFibo , 26 , " (3)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +27 , 2.969 );
ObjectSetFiboDescription(NameObjFibo , 27 , " (3) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +28 , 3.454 );
ObjectSetFiboDescription(NameObjFibo , 28 , " Четверть " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +29 , 3.840 );
ObjectSetFiboDescription(NameObjFibo , 29 , " (4)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +30 , 3.940 );
ObjectSetFiboDescription(NameObjFibo , 30 , " (4) (%$)" );
ObjectSet(NameObjFibo,OBJPROP_COLOR, gFiboTLColor );
ObjectSet(NameObjFibo,OBJPROP_LEVELCOLOR, gFiboColor );
ObjectSet(NameObjFibo,OBJPROP_STYLE, gFiboTLStyle );
ObjectSet(NameObjFibo,OBJPROP_LEVELSTYLE, gFiboStyle );
ObjectSet(NameObjFibo,OBJPROP_WIDTH, gFiboTLStyle_WIDTH );
ObjectSet(NameObjFibo,OBJPROP_LEVELWIDTH, gFiboStyle_WIDTH );
ObjectSet(NameObjFibo,OBJPROP_BACK, gFiboFONE );
ObjectSet (NameObjFibo, OBJPROP_PRICE1, iHigh(Symbol(),0,1) - (iHigh(Symbol(),0,1) - iLow(Symbol(),0,1))/4 );
ObjectSet (NameObjFibo, OBJPROP_PRICE2, iLow(Symbol(),0,1) + (iHigh(Symbol(),0,1) - iLow(Symbol(),0,1))*30 );
ObjectSet (NameObjFibo, OBJPROP_TIME1 , iTime(Symbol(),0,1+70 ) );
ObjectSet (NameObjFibo, OBJPROP_TIME2 , iTime(Symbol(),0,1+40 ) );
}
}
<code>//+------------------------------------------------------------------+
//| |
//| Copyright © 1999-2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.ru |
//+------------------------------------------------------------------+
/*
MQL4
yuraz © 2006-2009 yzh@mail.ru
для создания двухторонней фибо
2006, благодарность за содействие Вадиму Жунко
2008, Виталий
скрипт служит только для создания сетки
далее ее можно таскать по ТФ как удобно
*/
extern color gFiboTLColor =Red ; // Цвет настроечной линии ФИБО (TUNING LINE)
extern int gFiboStyle =1 ; // Настройка стиля линии ФИБО 0 1 2 3 4
extern int gFiboTLStyle =0 ; // Настройка стиля настроечной линии ФИБО (TUNING LINE) 0 1 2 3 4
extern int gFiboStyle_WIDTH =0 ; // Настройка толщины линии ФИБО на каждом ТФ 0 1 2 3 4
extern int gFiboTLStyle_WIDTH =2 ; // Настройка толщины настроечной линии ФИБО (TUNING LINE) 0 1 2 3 4
extern bool gFiboFONE =false ; // true - фоновое отображение линий Фибоначи ;
extern color gFiboColor =Blue ; // Цвет ФИБО
// сетка Yuraz Zhunko
//
extern double gsFibo31 = 1109.4 ; // 31 1109.0
extern double gsFibo30 = 685.4 ; // 30 685.4
extern double gsFibo29 = 598.0 ; // 29 598.0
extern double gsFibo28 = 510.8 ; // 28 510.8
extern double gsFibo27 = 423.6 ; // 27 423.6
extern double gsFibo26 = 361.8 ; // 26 369.6
extern double gsFibo25 = 311.0 ; // 25 315.7
extern double gsFibo24 = 261.8 ; // 24 261.8
extern double gsFibo23 = 211.0 ; // 23 211.8
extern double gsFibo22 = 161.8 ; // 22 161.8
extern double gsFibo21 = 138.2 ; // 21 138.2
//
extern double gsFibo20 = 100.0 ; // 20 0.0/100
extern double gsFibo19 = 0.9 ; // 19 11.8/88.2
extern double gsFibo18 = 23.4 ; // 18 23.6/76.4
extern double gsFibo17 = 0.55 ; // 17 38.2/61.8
extern double gsFibo16 = 0.5 ; // 16 50.0/50.0 ---
extern double gsFibo15 = 0.45 ; // 15 61.8/38.2
extern double gsFibo14 = 23.4 ; // 14 76.4/23.4
extern double gsFibo13 = 0.1 ; // 13 88.2/11.8
extern double gsFibo12 = 0.0 ; // 12 0.0/100
//
extern double gsFibo11 = 138.2 ; // 11 138.2
extern double gsFibo10 = 161.8 ; // 10 161.8
extern double gsFibo09 = 211.0 ; // 09 211.8
extern double gsFibo08 = 261.8 ; // 08 261.8
extern double gsFibo07 = 311.0 ; // 07 315.7
extern double gsFibo06 = 361.8 ; // 06 369.6
extern double gsFibo05 = 423.6 ; // 05 423.6
extern double gsFibo04 = 510.4 ; // 04 510.8
extern double gsFibo03 = 598.4 ; // 03 598.0
extern double gsFibo02 = 685.4 ; // 02 685.4
extern double gsFibo01 = 1109.4 ; // 01 1109.0
double gsFibo31d ;
double gsFibo30d ;
double gsFibo29d ;
double gsFibo28d ;
double gsFibo27d ;
double gsFibo26d ;
double gsFibo25d ;
double gsFibo24d ;
double gsFibo23d ;
double gsFibo22d ;
double gsFibo21d ;
double gsFibo20d ;
double gsFibo19d ;
double gsFibo18d ;
double gsFibo17d ;
double gsFibo16d ;
double gsFibo15d ;
double gsFibo14d ;
double gsFibo13d ;
double gsFibo12d ;
double gsFibo11d ;
double gsFibo10d ;
double gsFibo09d ;
double gsFibo08d ;
double gsFibo07d ;
double gsFibo06d ;
double gsFibo05d ;
double gsFibo04d ;
double gsFibo03d ;
double gsFibo02d ;
double gsFibo01d ;
string NameObjFibo = "FIBO_podpisi";
void init()
{
}
void start()
{
if(ObjectFind(NameObjFibo)== -1 )
{
ObjectCreate(NameObjFibo, OBJ_FIBO, 0, iHigh(Symbol(),0,1) - (iHigh(Symbol(),0,1) - iLow(Symbol(),0,1))/4 , iHigh(Symbol(),0,1) , iLow(Symbol(),0,1) + (iHigh(Symbol(),0,1) - iLow(Symbol(),0,1))/4 , iLow(Symbol(),0,1) );
ObjectSet(NameObjFibo, OBJPROP_RAY, false );
ObjectSet(NameObjFibo,OBJPROP_FIBOLEVELS,31 );
//--------------------------------Верхние---------------------------------------------
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +0 , -3.061 );
ObjectSetFiboDescription(NameObjFibo , 0 , " (4) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +1 , -2.960 );
ObjectSetFiboDescription(NameObjFibo , 1 , " (4) " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +2 , -2.545 );
ObjectSetFiboDescription(NameObjFibo , 2 , " Четверть " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +3 , -2.030 );
ObjectSetFiboDescription(NameObjFibo , 3 , " (3) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +4 , -1.930 );
ObjectSetFiboDescription(NameObjFibo , 4 , " (3)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +5 , -1.520 );
ObjectSetFiboDescription(NameObjFibo , 5 , " Четверть " );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +6 , -1.010 );
ObjectSetFiboDescription(NameObjFibo , 6 , " (2)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +7 , -0.910 );
ObjectSetFiboDescription(NameObjFibo , 7 , " (2) (%$)" );
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +8 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 8 , " (//) (%$)" );
ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +9 , -0.505 );
ObjectSetFiboDescription(NameObjFibo , 9 , " Четверть " );
// ObjectSet (NameObjFibo , OBJPROP_FIRSTLEVEL +10 , -0.999 );
// ObjectSetFiboDescription(NameObjFibo , 10 , " (//) (%$)" );
</code>
<code>//+------------------------------------------------------------------+
//| MeasureFIBO.mq4 |
//| ПавелИванович(api) |
//| p231970@hotmail.com |
//+------------------------------------------------------------------+
#property copyright "ПавелИванович(api)"
#property link "p231970@hotmail.com"
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
double fibo[]={-3.061,-2.960,-2.545,-2.030,-1.930,-1.520,-1.010,-0.910,-0.505,0,0.1,0.45,0.5,0.55,0.9,1,1.4950,1.890,1.990,2.480,2.869,2.969,3.454,3.840,3.940};
int start()
{
int x = WindowFirstVisibleBar()-WindowBarsPerChart()-1;
int p1 = 20 ; //iHighest(NULL,0,MODE_HIGH,WindowBarsPerChart()-1,x)
int p2 = 160 ; //iLowest(NULL,0,MODE_LOW,WindowBarsPerChart()-1,x)
datetime t1 = iTime(NULL,0,p1);
datetime t2 = iTime(NULL,0,p2);
x = ((GetTickCount()/1000)%86400);
string name="FIBO_"+x;
while(ObjectFind(name)!=-1)
{
x++;
name="FIBO_"+x;
}
ObjectCreate(name,OBJ_FIBO,0,t1,iHigh(NULL,0,p1),t2,iLow(NULL,0,p2));
ObjectSet(name,OBJPROP_FIBOLEVELS,ArraySize(fibo));
ObjectSet(name,OBJPROP_COLOR, Red );
ObjectSet(name,OBJPROP_LEVELCOLOR, Blue );
ObjectSet(name,OBJPROP_LEVELSTYLE, 1 );
ObjectSet(name,OBJPROP_WIDTH, 2 );
ObjectSet(name,OBJPROP_RAY_RIGHT, false );
ObjectSet(name,OBJPROP_SELECTED, true );
for(int i=0;i<ArraySize(fibo);i++)
{
ObjectSet(name,OBJPROP_FIRSTLEVEL+i,fibo[i]);
if(fibo[i]>=0)
{
if(fibo[i]<=1 && fibo[i]!=0.5)
ObjectSetFiboDescription(name,i,+"ДКЗ %$ ");
// ObjectSetFiboDescription(name,i,DoubleToStr(fibo[i]*100,1)+"(" + DoubleToStr((1-fibo[i])*100,1) + ")%% %$");
else
ObjectSetFiboDescription(name,i,+"%% %$ ");
// ObjectSetFiboDescription(name,i,DoubleToStr(fibo[i]*100,1)+"%% %$");
} else
ObjectSetFiboDescription(name,i,+"%% %$ ");
// ObjectSetFiboDescription(name,i,DoubleToStr((1-fibo[i])*100,1)+"%% %$");
}
return(0);
}
//+------------------------------------------------------------------+</code>
DKOLIA