LineFrakDown_v1

Author: Yuriy Tokman
LineFrakDown_v1
Price Data Components
Series array that contains the lowest prices of each bar
Indicators Used
Fractals
0 Views
0 Downloads
0 Favorites
LineFrakDown_v1
//+------------------------------------------------------------------+
//|                                                     LineFrakDown.mq4 |
//|                                                     Yuriy Tokman |
//|                                            yuriytokman@gmail.com |
//|                                             mod by Darkkiller    |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "yuriytokman@gmail.com"



#property indicator_chart_window


extern color Color = Red;
extern int Width = 1;
extern int Style = 0;
extern bool Ray = True;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
    ObjectCreate("Saport", OBJ_TREND, 0,0,0,0,0);//ñîçäàíèå òðåíäîâîé ëèíèè
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
  ObjectDelete("Saport");//óäàëåíèå îáåêòà   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   
//----
  double F1=0, F3=0, F13;    // íîìåðà ôðàêòàëîâ
  int    B1, B3, SR=2;               // íîìåðà áàðîâ
  
  while(F3==0)                       //ïîèñê ôðàêòàëîâ
  {
    F13=iFractals(NULL,0,MODE_LOWER,SR);
    if (F13!=0) 
    {
      if      (F1==0){B1=SR; F1=F13;}
      else if (F3==0){B3=SR; F3=F13;}
    }
    SR++; 
  }
    ObjectSet("Saport", OBJPROP_TIME1 ,iTime(NULL,0,B3));
    ObjectSet("Saport", OBJPROP_TIME2 ,iTime(NULL,0,B1));
    ObjectSet("Saport", OBJPROP_PRICE1,iLow(NULL,0,B3));
    ObjectSet("Saport", OBJPROP_PRICE2,iLow(NULL,0,B1));
    ObjectSet("Saport", OBJPROP_RAY,Ray);
    ObjectSet("Saport", OBJPROP_COLOR,Color);
    ObjectSet("Saport", OBJPROP_WIDTH,Width);
    ObjectSet("Saport", OBJPROP_STYLE,Style);
  
//----
   return(0);
  }
//+------------------------------------------------------------------+

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