Author: Copyright(c) 2010 Masaru Sasaki
Begashole
Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
Begashole
//+------------------------------------------------------------------+
//|                                                    Begashole.mq4 |
//|                                  Copyright(c) 2010 Masaru Sasaki |
//|                                             youtarou.blogzine.jp |
//+------------------------------------------------------------------+
//
// u–Ɛӎ–€v
//  *‚±‚̃vƒƒOƒ‰ƒ€‚ÉŠî‚­sˆ×‚ÌŒ‹‰Ê”­¶‚µ‚½áŠQA‘¹Ž¸‚Ȃǂɂ‚¢‚Ä
//    ’˜ìŽÒ‚ÍˆêØ‚̐ӔC‚𕉂¢‚Ü‚¹‚ñB
//
// uà–¾v
//  *ƒxƒKƒX•ûŽ®‚̃xƒKƒXƒgƒ“ƒlƒ‹‚ðƒ`ƒƒ[ƒgã‚É•\ަ‚·‚é
//   ƒCƒ“ƒWƒP[ƒ^[‚Å‚·B
//
// ŽQl‘ÐFFXƒƒ^ƒgƒŒ[ƒ_[“ü–å (PanRolling)
//           FXƒƒ^ƒgƒŒ[ƒ_[ŽÀ‘HƒvƒƒOƒ‰ƒ~ƒ“ƒO (PanRolling)
//
#property copyright "Copyright(c) 2010 Masaru Sasaki"
#property link      "youtarou.blogzine.jp"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Cyan
#property indicator_color2 Cyan
#property indicator_width1 1
#property indicator_width2 1

// Žw•Wƒoƒbƒtƒ@
double BufBegasHole1[];
double BufBegasHole2[];

// ƒxƒKƒXƒz[ƒ‹‚̈ړ®•½‹Ï’l
extern int HOLE1_EMA_period = 144;
extern int HOLE2_EMA_period = 169;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   // Žw•Wƒoƒbƒtƒ@‚ÌŠ„‚è“–‚Ä
   SetIndexBuffer(0, BufBegasHole1);
   SetIndexBuffer(1, BufBegasHole2);
   
   // Žw•WƒXƒ^ƒCƒ‹‚̐ݒè
   SetIndexStyle(0, DRAW_HISTOGRAM,STYLE_DOT);
   SetIndexStyle(1, DRAW_HISTOGRAM,STYLE_DOT);

   
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {

   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   int limit = Bars-counted_bars;
   
   for(int i=limit-1; i>=0; i-- )
   {
      BufBegasHole1[i] = iMA(NULL, 0, HOLE1_EMA_period, 0, MODE_EMA, PRICE_CLOSE, i);

      BufBegasHole2[i] = iMA(NULL, 0, HOLE2_EMA_period, 0, MODE_EMA, PRICE_CLOSE, i);

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