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

#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
    ObjectCreate("Rezist", OBJ_TREND, 0,0,0,0,0);//ñîçäàíèå òðåíäîâîé ëèíèè
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
  ObjectDelete("Rezist");//óäàëåíèå îáåêòà   
//----
   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_UPPER,SR);
    if (F13!=0) 
    {
      if      (F1==0){B1=SR; F1=F13;}
      else if (F3==0){B3=SR; F3=F13;}
    }
    SR++; 
  }
    ObjectSet("Rezist", OBJPROP_TIME1 ,iTime(NULL,0,B3));
    ObjectSet("Rezist", OBJPROP_TIME2 ,iTime(NULL,0,B1));
    ObjectSet("Rezist", OBJPROP_PRICE1,iHigh(NULL,0,B3));
    ObjectSet("Rezist", OBJPROP_PRICE2,iHigh(NULL,0,B1));
    ObjectSet("Rezist", OBJPROP_RAY   , True);

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