Author: Copyright � 2010, basisforex@gmail.com
Para_B
Indicators Used
Parabolic Stop and Reverse system
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
Para_B
/*------------------------------------------------------------------+
 |                                                       Para_B.mq4 |
 |                                                 Copyright © 2010 |
 |                                             basisforex@gmail.com |
 +------------------------------------------------------------------*/
#property copyright "Copyright © 2010, basisforex@gmail.com"
#property link      "basisforex@gmail.com"
//----
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 White
#property indicator_color2 Yellow
#property indicator_color3 Orange
#property indicator_color4 Red
#property indicator_color5 Brown
#property indicator_color6 Green
#property indicator_color7 Blue
#property indicator_color8 Black
//----
extern double    Step = 0.02;
extern double    Maximum = 0.2;
//----
extern int       MaShift   = 0;
//----
double M1Buffer[];
double M5Buffer[];
double M15Buffer[];
double M30Buffer[];
double H1Buffer[];
double H4Buffer[];
double D1Buffer[];
double MnBuffer[];
//+------------------------------------------------------------------+
int init()
 {
   SetIndexShift(0, MaShift);
   SetIndexShift(1, MaShift);
   SetIndexShift(2, MaShift);
   SetIndexShift(3, MaShift);
   SetIndexShift(4, MaShift);
   SetIndexShift(5, MaShift);
   SetIndexShift(6, MaShift);
   SetIndexShift(7, MaShift);
//----
   SetIndexBuffer(0, M1Buffer);
   SetIndexBuffer(1, M5Buffer);
   SetIndexBuffer(2, M15Buffer);
   SetIndexBuffer(3, M30Buffer);
   SetIndexBuffer(4, H1Buffer);
   SetIndexBuffer(5, H4Buffer);
   SetIndexBuffer(6, D1Buffer);
   SetIndexBuffer(7, MnBuffer);
//----
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 159);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 159);
   SetIndexStyle(2, DRAW_ARROW);
   SetIndexArrow(2, 159);
   SetIndexStyle(3, DRAW_ARROW);
   SetIndexArrow(3, 159);
   SetIndexStyle(4, DRAW_ARROW);
   SetIndexArrow(4, 159);
   SetIndexStyle(5, DRAW_ARROW);
   SetIndexArrow(5, 159);
   SetIndexStyle(6, DRAW_ARROW);
   SetIndexArrow(6, 159);
   SetIndexStyle(7, DRAW_ARROW);
   SetIndexArrow(7, 159);
//----
   SetIndexLabel(0, "M1");
   SetIndexLabel(1, "M5");
   SetIndexLabel(2, "M15");
   SetIndexLabel(3, "M30");
   SetIndexLabel(4, "H1");
   SetIndexLabel(5, "H4");
   SetIndexLabel(6, "D1");
   SetIndexLabel(7, "Mn");
//----
   return(0);
 }
//+------------------------------------------------------------------+
int start()
 {
   if (Period() != 1)
    {
		Comment("Not a right Period!!! It should be M1");
		return(0);	
	 }
   int limit;
   int counted_bars = IndicatorCounted();
   if(counted_bars < 0) return(-1);
   if(counted_bars > 0) counted_bars--;
   limit = Bars - counted_bars;
   for(int i = 0; i < limit; i++)
    {
      M1Buffer[i]  = iSAR(NULL, PERIOD_M1, Step, Maximum, i);
      M5Buffer[i]  = iSAR(NULL, PERIOD_M5, Step, Maximum, i / PERIOD_M5);
      M15Buffer[i] = iSAR(NULL, PERIOD_M15, Step, Maximum, i / PERIOD_M15);
      M30Buffer[i] = iSAR(NULL, PERIOD_M30, Step, Maximum, i / PERIOD_M30);
      H1Buffer[i]  = iSAR(NULL, PERIOD_H1, Step, Maximum, i / PERIOD_H1);
      H4Buffer[i]  = iSAR(NULL, PERIOD_H4, Step, Maximum, i / PERIOD_H4);
      D1Buffer[i]  = iSAR(NULL, PERIOD_D1, Step, Maximum, i / PERIOD_D1);
      MnBuffer[i]  = iSAR(NULL, PERIOD_MN1, Step, Maximum, i / PERIOD_MN1);
    }  
   //-----
   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 ---