Author: Copyright � 2010, LeMan.
Indicators Used
Parabolic Stop and Reverse system
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
OscSAR
//+------------------------------------------------------------------+
//|                                                       OscSAR.mq4 |
//|                                         Copyright © 2010, LeMan. |
//|                                                 b-market@mail.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, LeMan."
#property link      "b-market@mail.ru"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue
//----
extern double    Step = 0.02;
extern double    Maximum = 0.2;
//----
double OscBuffer[];
//+------------------------------------------------------------------+
int init() {
   string short_name;
//----   
   IndicatorDigits(Digits);
//----
   SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(0, OscBuffer);
//----
   SetIndexDrawBegin(0, 14);   
//----
   short_name = "OscSAR (" + Step + "," + Maximum + ") ";
   IndicatorShortName(short_name);
//----
   return(0);
}
//+------------------------------------------------------------------+
int start() {
   int i, limit, counted_bars = IndicatorCounted();
//----
   if (Bars < 3) {
      return(0);
   }   
//----
   if (counted_bars > 0) {
      counted_bars--;
   }
   limit = Bars - counted_bars - 1;
   for (i = limit; i >= 0; i--) {
      OscBuffer[i] = Close[i] - iSAR(NULL, 0, Step, Maximum, 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 ---