u_ytg_ISH_V0

Author: Yuriy Tokman
Indicators Used
Ichimoku Kinko Hyo
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
u_ytg_ISH_V0
//+------------------------------------------------------------------+
//|                                                    !ytg_ISH.mq4 |
//|                                                     Yuriy Tokman |
//|                                         http://www.mql-design.ru |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "http://www.mql-design.ru"

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Blue
#property indicator_color3 SaddleBrown
#property indicator_color4 Thistle
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2

extern string Copyright = "Yuriy Tokman";
extern string ÏÈØÓ_ÍÀ_ÇÀÊÀÇ_ÝÊÑÏÅÐÒÛ = "ÈÍÄÈÊÀÒÎÐÛ_ÑÊÐÈÏÒÛ";
extern string e_mail = "yuriytokman@gmail.com";
extern string Skype = "yuriy.t.g";

extern int tf = 1440;

double ExtMapBuffer0[];
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];

string char1[256];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer0);
   
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer1);
   
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer2);
   
   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,ExtMapBuffer3);
   
   int i;
   for (i = 0; i < 256; i++) char1[i] = CharToStr(i);Label("ytg_logo_8",
   char1[104]+char1[116]+char1[116]+char1[112]+char1[58]+char1[47]+char1[47]+char1[119]+char1[119]+char1[119]+char1[46]+char1[109]+char1[113]+char1[108]+char1[45]+char1[100]+char1[101]+char1[115]+char1[105]+char1[103]+char1[110]+char1[46]+char1[114]+char1[117],
   3,450,5,14,"Arial",Lime);
   
   IndicatorShortName("YTG ("+tf+")");
   
   SetIndexLabel(0," yuriytokman@gmail.com  ");
   SetIndexLabel(1," Skype - yuriy.t.g  ");
   SetIndexLabel(2," yuriytokman@gmail.com  ");
   SetIndexLabel(3," Skype - yuriy.t.g  ");     
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   GetDellName();
//----
   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;
   if(counted_bars==0) limit--;
   GetST(limit);    
//----
   return(0);
  }
//+------------------------------------------------------------------+
 void Label(string name_label,string text_label,int corner = 2,int x = 3,int y = 15,int font_size = 10,string font_name = "Arial",color text_color = LimeGreen )
  {
   if (ObjectFind(name_label)!=-1) ObjectDelete(name_label);
   ObjectCreate(name_label,OBJ_LABEL,0,0,0,0,0);         
   ObjectSet(name_label,OBJPROP_CORNER,corner);
   ObjectSet(name_label,OBJPROP_XDISTANCE,x);
   ObjectSet(name_label,OBJPROP_YDISTANCE,y);
   ObjectSetText(name_label,text_label,font_size,font_name,text_color);
  }
 double GetI( int m, int b)
  {
   double r = iIchimoku(Symbol(),tf, 9, 26, 52, m, b);
   return(r);
  }
 void GetDellName (string name_n = "ytg_")
  {
   string vName;
   for(int i=ObjectsTotal()-1; i>=0;i--)
    {
     vName = ObjectName(i);
     if (StringFind(vName,name_n) !=-1) ObjectDelete(vName);
    }  
  }
 void GetST( int l)
  {
   for(int i=l; i>=0; i--)
   {
    int bars = iBarShift(Symbol(),tf,Time[i]);    
    ExtMapBuffer0[i]=GetI(1, bars);
    ExtMapBuffer1[i]=GetI(2, bars);
    ExtMapBuffer2[i]=GetI(3, bars);    
    ExtMapBuffer3[i]=GetI(4, bars);        
   }  
  }

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