Fractal_Identifier 2.0

Author: Chioma J. Obunadike
0 Views
0 Downloads
0 Favorites
Fractal_Identifier 2.0
//+------------------------------------------------------------------+
//|                                        Fractal_Identifier2.0.mq5 |
//|                                              Chioma J. Obunadike |
//|                                     https://wa.me/+2349124641304 |
//+------------------------------------------------------------------+
#property copyright "Chioma J. Obunadike"
#property link      "https://wa.me/+2349124641304"
#property version   "1.00"
#property indicator_chart_window

//+------------------------------------------------------------------+
int fractals;
int bars= 10;
int OnInit()
  {

fractals = iFractals(_Symbol, _Period);

 return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
void OnTick()
 { 
  // Loop through each element in the buffer
    for(int i=bars;i>=0;i--)
    {
    double fracUp[];
    ArraySetAsSeries(fracUp,true);
    CopyBuffer(fractals,UPPER_LINE,0,11,fracUp);
    
    if (fracUp[i] == EMPTY_VALUE) //check if the bar has a fractal and skip if it doesn't
    {continue;}
    
    else if (fracUp[i] != EMPTY_VALUE)  //confirm that the bar doesn't have an empty value'
    {
    double current_fractal_high = NormalizeDouble(fracUp[i],5);
    Comment ("Most recent Fractal: ", current_fractal_high );
      }    
      }
        
    }



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