Author: Barmaley
Indicators Used
Fractals
0 Views
0 Downloads
0 Favorites
FrVol
//+------------------------------------------------------------------+
//|                                                        FrVol.mq4 |
//|                              Ñðåäíåå ðàññòîÿíèå ìåæäó ôðàêòàëàìè |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Barmaley"
#property link      ""

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
   double u,d,U,D;
   int cu,cd;
//----
      for (int i=3;i<=Bars-3;i++) {
         u=iFractals(NULL,0,MODE_UPPER,i);
         d=iFractals(NULL,0,MODE_LOWER,i);
         
         if (u>0) {U+=u;cu++;}
         if (d>0) {D+=d;cd++;}
      }
      
      U/=cu; D/=cd;
      int V=(U-D)/Point;
      Comment (Symbol(),"  TF=",Period(),"   ",V);
//----
   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 ---