bollinger-inverse

Author: Copyright © 2005, MetaQuotes Software Corp.
Indicators Used
Bollinger bands indicator
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
bollinger-inverse
ÿþ//+------------------------------------------------------------------+

//|                                            bollinger-inverse.mq4 |

//|                        Copyright 2022, MetaQuotes Software Corp. |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2005, MetaQuotes Software Corp."

#property link      "http://www.metaquotes.net"



#property strict

#property indicator_chart_window

#property indicator_buffers 3

#property indicator_color1 MediumSeaGreen

#property indicator_color2 Orange

#property indicator_color3 IndianRed







extern int periodbb =10; // period of wpr#1

extern double deviation =1.25; // period of ma of wpr#1

extern int shift = 1; // method of MAWPR buffers

//----

double BBH[];

double BB[];

double BBL[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function                         |

//+------------------------------------------------------------------+

int init()

  {

//---- indicator line

   SetIndexStyle(0,DRAW_LINE, 0, 3, MediumSeaGreen);

   SetIndexBuffer(0, BBH);



   SetIndexStyle(1,DRAW_LINE, 0, 3, Orange);

   SetIndexBuffer(1, BB);



   SetIndexStyle(2,DRAW_LINE, 0, 3, IndianRed);

   SetIndexBuffer(2, BBL);





//---- name for DataWindow and indicator subwindow label









   return(0);

  }

//----



//+------------------------------------------------------------------+

//| MTF Parabolic Sar                                                |

//+------------------------------------------------------------------+

int start()

  {

   datetime TimeArray[];



   int    i,limit,counted_bars=IndicatorCounted();



// Plot defined time frame on to current time frame



//----

   limit=Bars-counted_bars;

   for(i=0; i<limit; i++)

     {

      BBH[i]=iBands(Symbol(),PERIOD_CURRENT,periodbb, deviation,shift,0,MODE_LOWER,i);//upper

      BB[i]=iBands(Symbol(),PERIOD_CURRENT,periodbb,deviation,shift,0,MODE_MAIN,i);//middle

      BBL[i]=iBands(Symbol(),PERIOD_CURRENT,periodbb, deviation,shift,0,MODE_UPPER,i);//lower

     }





//----

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