Author: Chris Battles
zzf
Miscellaneous
Implements a curve of type %1
1 Views
0 Downloads
0 Favorites
zzf
//+------------------------------------------------------------------+
//|                                                   FX-CHANNEL.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Chris Battles"
#property link      "mailto:cbattles@neo.rr.com"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Gold

//---- buffers
double v1[];

//----
double val1;

int k;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+  
int init()
  {
//---- drawing settings
   
//----   
   SetIndexStyle(0, DRAW_SECTION, STYLE_SOLID, 1);
   SetIndexDrawBegin(0, k);
   SetIndexBuffer(0, v1);
   SetIndexLabel(0, "UPPER");  
//----

//----
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {

  
   k = Bars;
   
   while(k >= 0)
     {   
       val1 =iCustom(NULL, 0, "ZIGZAG-FRACTALS",0,k);
       if(val1 > 0)
           v1[k] = val1;
       else
           v1[k] = v1[k+1]; 
      
       k--;
     }   
   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 ---