DDFX 8 Sentiment v3

Author: Market Sentiment
DDFX 8 Sentiment v3
Indicators Used
Commodity channel indexMoving average indicator
Miscellaneous
Implements a curve of type %1
0 Views
0 Downloads
0 Favorites
DDFX 8 Sentiment v3
/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Market Sentiment"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 PaleGreen

int g_period_76 = 50;
int g_period_80 = 144;
int g_period_84 = 233;
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];
double gd_100;
double gd_108;
double g_icci_116;

int init() {
   IndicatorBuffers(3);
   SetIndexBuffer(0, g_ibuf_88);
   SetIndexStyle(0, DRAW_HISTOGRAM);
   SetIndexBuffer(1, g_ibuf_92);
   SetIndexStyle(1, DRAW_HISTOGRAM);
   SetIndexBuffer(2, g_ibuf_96);
   SetIndexStyle(2, DRAW_HISTOGRAM);
   IndicatorShortName("MARKET SENTIMENT");
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int l_ind_counted_0 = IndicatorCounted();
   if (l_ind_counted_0 < 0) return (-1);
   int li_4 = Bars - l_ind_counted_0;
   if (li_4 > Bars) li_4 = Bars;
   for (int li_8 = li_4; li_8 >= 0; li_8--) {
      g_icci_116 = iCCI(NULL, 0, g_period_76, PRICE_TYPICAL, li_8);
      gd_100 = iMA(NULL, 0, g_period_80, 0, MODE_EMA, PRICE_CLOSE, li_8) - iMA(NULL, 0, g_period_84, 0, MODE_EMA, PRICE_CLOSE, li_8);
      gd_108 = iMA(NULL, 0, g_period_80, 0, MODE_EMA, PRICE_CLOSE, li_8 + 1) - iMA(NULL, 0, g_period_84, 0, MODE_EMA, PRICE_CLOSE, li_8 + 1);
      g_ibuf_88[li_8] = 0.0;
      g_ibuf_92[li_8] = 0.0;
      g_ibuf_96[li_8] = 0.0;
      if (g_icci_116 > 0.0 && gd_100 > gd_108) g_ibuf_88[li_8] = 1.0;
      else {
         if (g_icci_116 < 0.0 && gd_100 < gd_108) g_ibuf_92[li_8] = 1.0;
         else g_ibuf_96[li_8] = 1.0;
      }
   }
   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 ---