YURAZ_CreateDualFibo

Price Data Components
Series array that contains the highest prices of each barSeries array that contains the lowest prices of each bar
0 Views
0 Downloads
0 Favorites
YURAZ_CreateDualFibo
//+------------------------------------------------------------------+
//|                                                                  |
//|                 Copyright © 1999-2006, MetaQuotes Software Corp. |
//|                                         http://www.metaquotes.ru |
//+------------------------------------------------------------------+

/*

  MQL4 

  yuraz (C) 2006-2009 yzh@mail.ru 
  äëÿ ñîçäàíèÿ äâóõòîðîííåé ôèáî
  2006, áëàãîäàðíîñòü çà ñîäåéñòâèå Âàäèìó Æóíêî
  2008, Âèòàëèé 

  ñêðèïò ñëóæèò òîëüêî äëÿ ñîçäàíèÿ ñåòêè
  äàëåå åå ìîæíî òàñêàòü ïî ÒÔ êàê óäîáíî
 

*/

extern  color    gFiboTLColor         =Red                  ; // Öâåò íàñòðîå÷íîé ëèíèè ÔÈÁÎ (TUNING LINE)  
extern  int      gFiboStyle           =3                    ; // Íàñòðîéêà ñòèëÿ ëèíèè ÔÈÁÎ   0 1 2 3 4
extern  int      gFiboTLStyle         =2                    ; // Íàñòðîéêà ñòèëÿ íàñòðîå÷íîé ëèíèè ÔÈÁÎ (TUNING LINE)  0 1 2 3 4
extern  int      gFiboStyle_WIDTH     =0                    ; // Íàñòðîéêà òîëùèíû ëèíèè ÔÈÁÎ íà êàæäîì ÒÔ  0 1 2 3 4
extern  int      gFiboTLStyle_WIDTH   =0                    ; // Íàñòðîéêà òîëùèíû íàñòðîå÷íîé ëèíèè ÔÈÁÎ (TUNING LINE)    0 1 2 3 4 
extern  bool     gFiboFONE            =true                 ; // true - ôîíîâîå îòîáðàæåíèå ëèíèé Ôèáîíà÷è ;
extern  color    gFiboColor           =DarkSlateGray        ; // Öâåò ÔÈÁÎ

// Ñåòêà Âèòàëèé  ?



//
// Ñåòêà 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                =    0.0              ; // 20  0.0/100
extern double gsFibo19                =   11.8              ; // 19  11.8/88.2  
extern double gsFibo18                =   23.4              ; // 18  23.6/76.4  
extern double gsFibo17                =   38.2              ; // 17  38.2/61.8  
extern double gsFibo16                =   50.0              ; // 16  50.0/50.0  ---
extern double gsFibo15                =   38.2              ; // 15  61.8/38.2  
extern double gsFibo14                =   23.4              ; // 14  76.4/23.4  
extern double gsFibo13                =   11.8              ; // 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 ;

// ñåòêà îòìèíóñîâàííàÿ ïî 100

double gsFibo31d1 ;
double gsFibo30d1 ;
double gsFibo29d1 ;
double gsFibo28d1 ;

double gsFibo27d1 ;
double gsFibo26d1 ;
double gsFibo25d1 ;
double gsFibo24d1 ;
double gsFibo23d1 ;
double gsFibo22d1 ;
double gsFibo21d1 ;
double gsFibo20d1 ; 
double gsFibo19d1 ;

double gsFibo18d1 ;
double gsFibo17d1 ;
double gsFibo16d1 ;
double gsFibo15d1 ;
double gsFibo14d1 ;
double gsFibo13d1 ;
double gsFibo12d1 ;
double gsFibo11d1 ;
double gsFibo10d1 ;

double gsFibo09d1 ;
double gsFibo08d1 ;
double gsFibo07d1 ;
double gsFibo06d1 ;
double gsFibo05d1 ;
double gsFibo04d1 ;
double gsFibo03d1 ;
double gsFibo02d1 ;
double gsFibo01d1 ;


string NameObjFibo =  "yzFIBO_DUAL";


void init()
{

   gsFibo31d =(gsFibo31 )/100 ;
   gsFibo30d =(gsFibo30 )/100 ;
   gsFibo29d =(gsFibo29 )/100 ;
   gsFibo28d =(gsFibo28 )/100 ;
   gsFibo27d =(gsFibo27 )/100 ;
   gsFibo26d =(gsFibo26 )/100 ;
   gsFibo25d =(gsFibo25 )/100 ;
   gsFibo24d =(gsFibo24 )/100 ;
   gsFibo23d =(gsFibo23 )/100 ;
   gsFibo22d =(gsFibo22 )/100 ;
   gsFibo21d =(gsFibo21 )/100 ;


   gsFibo20d =gsFibo20        ;
   gsFibo19d =(gsFibo19 )/100 ;
   gsFibo18d =(gsFibo18 )/100 ;
   gsFibo17d =(gsFibo17 )/100 ;
   gsFibo16d =(gsFibo16 )/100 ;
   gsFibo15d =(gsFibo15 )/100 ;
   gsFibo14d =(gsFibo14 )/100 ;
   gsFibo13d =(gsFibo13 )/100 ;
   gsFibo12d =gsFibo12        ;

   gsFibo11d =(gsFibo11 - 100 )/100 ;
   gsFibo10d =(gsFibo10 - 100 )/100 ;
   gsFibo09d =(gsFibo09 - 100 )/100 ;
   gsFibo08d =(gsFibo08 - 100 )/100 ;
   gsFibo07d =(gsFibo07 - 100 )/100 ;
   gsFibo06d =(gsFibo06 - 100 )/100 ;
   gsFibo05d =(gsFibo05 - 100 )/100 ;
   gsFibo04d =(gsFibo04 - 100 )/100 ;
   gsFibo03d =(gsFibo03 - 100 )/100 ;
   gsFibo02d =(gsFibo02 - 100 )/100 ;
   gsFibo01d =(gsFibo01 - 100 )/100 ;



   gsFibo31d1 =(gsFibo31 - 100);
   gsFibo30d1 =(gsFibo30 - 100);
   gsFibo29d1 =(gsFibo29 - 100);
   gsFibo28d1 =(gsFibo28 - 100);
   gsFibo27d1 =(gsFibo27 - 100);
   gsFibo26d1 =(gsFibo26 - 100);
   gsFibo25d1 =(gsFibo25 - 100);
   gsFibo24d1 =(gsFibo24 - 100);
   gsFibo23d1 =(gsFibo23 - 100);
   gsFibo22d1 =(gsFibo22 - 100);
   gsFibo21d1 =(gsFibo21 - 100);

   gsFibo20d1 =(gsFibo20      );
   gsFibo19d1 =(gsFibo19      );
   gsFibo18d1 =(gsFibo18      );
   gsFibo17d1 =(gsFibo17      );
   gsFibo16d1 =(gsFibo16      );
   gsFibo15d1 =(gsFibo15      );
   gsFibo14d1 =(gsFibo14      );
   gsFibo13d1 =(gsFibo13      );
   gsFibo12d1 =(gsFibo12      );

   gsFibo11d1 =(gsFibo11 - 100);
   gsFibo10d1 =(gsFibo10 - 100);
   gsFibo09d1 =(gsFibo09 - 100);
   gsFibo08d1 =(gsFibo08 - 100);
   gsFibo07d1 =(gsFibo07 - 100);
   gsFibo06d1 =(gsFibo06 - 100);
   gsFibo05d1 =(gsFibo05 - 100);
   gsFibo04d1 =(gsFibo04 - 100);
   gsFibo03d1 =(gsFibo03 - 100);
   gsFibo02d1 =(gsFibo02 - 100);
   gsFibo01d1 =(gsFibo01 - 100);





}




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 ,                gsFibo31d                            );
      ObjectSetFiboDescription(NameObjFibo ,                      0 ,  DoubleToStr(  gsFibo31    ,1)         + " (%$) 31"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL + 1 ,                gsFibo30d                            );
      ObjectSetFiboDescription(NameObjFibo ,                      1 ,  DoubleToStr(  gsFibo30    ,1)         + " (%$) 30"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL + 2 ,                gsFibo29d                            );
      ObjectSetFiboDescription(NameObjFibo ,                      2 ,  DoubleToStr(  gsFibo29    ,1)         + " (%$) 29"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL + 3 ,                gsFibo28d                            );
      ObjectSetFiboDescription(NameObjFibo ,                      3 ,  DoubleToStr(  gsFibo28    ,1)         + " (%$) 28"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL + 4 ,                gsFibo27d                            );
      ObjectSetFiboDescription(NameObjFibo ,                      4 ,  DoubleToStr(  gsFibo27    ,1)         + " (%$) 27"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL  +5 ,                gsFibo26d                            );  
      ObjectSetFiboDescription(NameObjFibo ,                      5 ,  DoubleToStr(  gsFibo26    ,1)         + " (%$) 26"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL  +6 ,                gsFibo25d                            );  
      ObjectSetFiboDescription(NameObjFibo ,                      6 ,  DoubleToStr(  gsFibo25    ,1)         + " (%$) 25"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL  +7 ,                gsFibo24d                            );  
      ObjectSetFiboDescription(NameObjFibo ,                      7 ,  DoubleToStr(  gsFibo24    ,1)         + " (%$) 24"    );
                                                                                                                       
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL  +8 ,                gsFibo23d                            );       
      ObjectSetFiboDescription(NameObjFibo ,                      8 ,  DoubleToStr(  gsFibo23    ,1)         + " (%$) 23"    );
                                                                                                         
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL  +9 ,                gsFibo22d                            );      
      ObjectSetFiboDescription(NameObjFibo ,                      9 ,  DoubleToStr(  gsFibo22    ,1)         + " (%$) 22"    );
                                                                                                         
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +10 ,                gsFibo21d                            );       
      ObjectSetFiboDescription(NameObjFibo ,                     10 ,  DoubleToStr(  gsFibo21    ,1)         + " (%$) 21"    );
      
      //-------------------------------Âíóòðåííèå------------------------------------------     

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +11 ,                0.000                                );  // 0.000      
      ObjectSetFiboDescription(NameObjFibo ,                     11 ,                                 "0.0/100.0 (%$) 20"    );        
                                                                                                                                                     
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +12 ,                0.118                                );  // 0.118      
      ObjectSetFiboDescription(NameObjFibo ,                     12 ,                                 "11.8/88.2 (%$) 19"    );        
                                                                                                                                                     
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +13 ,                0.236                                );  // 0.236 
      ObjectSetFiboDescription(NameObjFibo ,                     13 ,                                 "23.6/76.4 (%$) 18"    );        
                                                                                                                                
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +14 ,                0.382                                );  // 0.382 
      ObjectSetFiboDescription(NameObjFibo ,                     14 ,                                 "38.2/61.8 (%$) 17"    );        
                                                                                                                                
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +15 ,                0.500                                );  // 0.500  pivot
      ObjectSetFiboDescription(NameObjFibo ,                     15 ,                                 "50.0/50.0 (%$) 16"    );        
                                                                                                                           
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +16 ,                0.618                                );  // 0.618 
      ObjectSetFiboDescription(NameObjFibo ,                     16 ,                                 "61.8/38.2 (%$) 15"    );        
                                                                                                                         
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +17 ,                0.764                                );  // 0.764 
      ObjectSetFiboDescription(NameObjFibo ,                     17 ,                                 "76.4/23.6 (%$) 14"    );        
                                                                                                                              
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +18 ,                0.882                                );  // 0.882 
      ObjectSetFiboDescription(NameObjFibo ,                     18 ,                                 "88.2/11.8 (%$) 13"    );
                                                                                                   
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +19 ,                1.000                                );  // 1.000
      ObjectSetFiboDescription(NameObjFibo ,                     19 ,                                 "100.0/0.0 (%$) 12"    );

      //---------------------------------Íèæíèå---------------------------------------------       

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +20 ,               -gsFibo11d                            );
      ObjectSetFiboDescription(NameObjFibo ,                     20 ,  DoubleToStr(  gsFibo11    ,1) +         "-(%$) 11"    );

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +21 ,               -gsFibo10d                            );
      ObjectSetFiboDescription(NameObjFibo ,                     21 ,  DoubleToStr(  gsFibo10    ,1) +         "-(%$) 10"    );

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +22 ,               -gsFibo09d                            ); // 138.2
      ObjectSetFiboDescription(NameObjFibo ,                     22 ,  DoubleToStr(  gsFibo09    ,1) +         "-(%$)  9"    );

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +23 ,               -gsFibo08d                            ); // 161.8
      ObjectSetFiboDescription(NameObjFibo ,                     23 ,  DoubleToStr(  gsFibo08    ,1) +         "-(%$)  8"    );

      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +24 ,               -gsFibo07d                            ); // 211.0
      ObjectSetFiboDescription(NameObjFibo ,                     24 ,  DoubleToStr(  gsFibo07    ,1) +         "-(%$)  7"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +25 ,               -gsFibo06d                            ); // 261.8
      ObjectSetFiboDescription(NameObjFibo ,                     25 ,  DoubleToStr(  gsFibo06    ,1) +         "-(%$)  6"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +26 ,               -gsFibo05d                            ); // 311.0
      ObjectSetFiboDescription(NameObjFibo ,                     26 ,  DoubleToStr(  gsFibo05    ,1) +         "-(%$)  5"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +27 ,               -gsFibo04d                            ); // 361.8
      ObjectSetFiboDescription(NameObjFibo ,                     27 ,  DoubleToStr(  gsFibo04    ,1) +         "-(%$)  4"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +28 ,               -gsFibo03d                            ); // 423.6
      ObjectSetFiboDescription(NameObjFibo ,                     28 ,  DoubleToStr(  gsFibo03    ,1) +         "-(%$)  3"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +29 ,               -gsFibo02d                            ); // 685
      ObjectSetFiboDescription(NameObjFibo ,                     29 ,  DoubleToStr(  gsFibo02    ,1) +         "-(%$)  2"    );
                                                                                                            
      ObjectSet               (NameObjFibo , OBJPROP_FIRSTLEVEL +30 ,               -gsFibo01d                            );
      ObjectSetFiboDescription(NameObjFibo ,                     30 ,  DoubleToStr(  gsFibo01    ,1) +         "-(%$)  1"    );
                                                                                                            
      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))/4    );
      ObjectSet   (NameObjFibo, OBJPROP_TIME1 , iTime(Symbol(),0,1+3 ) );
      ObjectSet   (NameObjFibo, OBJPROP_TIME2 , iTime(Symbol(),0,1 ) );

     }
  }

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 ---