Indicators Used
Miscellaneous
0
Views
0
Downloads
0
Favorites
PwR
#property copyright "Copyright © 2009, MoForce"
#property link ""
#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Black
#property indicator_color2 Blue
#property indicator_color3 Red
#property indicator_color4 Lime
#property indicator_color5 White
int g_period_76 = 3;
int gi_unused_80 = 26;
int g_period_84 = 144;
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];
double g_ibuf_104[];
int init() {
SetIndexStyle(0, DRAW_NONE);
SetIndexStyle(1, DRAW_HISTOGRAM);
SetIndexStyle(2, DRAW_HISTOGRAM);
SetIndexStyle(3, DRAW_LINE);
SetIndexStyle(4, DRAW_LINE);
SetIndexDrawBegin(1, g_period_84);
IndicatorDigits(Digits + 1);
SetIndexBuffer(0, g_ibuf_104);
SetIndexBuffer(1, g_ibuf_88);
SetIndexBuffer(2, g_ibuf_92);
SetIndexBuffer(3, g_ibuf_96);
SetIndexBuffer(4, g_ibuf_100);
IndicatorShortName("PwR");
return (0);
}
int start() {
int li_4 = IndicatorCounted();
if (li_4 > 0) li_4--;
int li_0 = Bars - li_4;
for (int li_8 = 0; li_8 < li_0; li_8++) {
if (iBullsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) + iBearsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) >= 0.0) {
g_ibuf_88[li_8] = iBullsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) + iBearsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8);
g_ibuf_92[li_8] = 0;
g_ibuf_104[li_8] = iBullsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) + iBearsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8);
} else {
g_ibuf_88[li_8] = 0;
g_ibuf_92[li_8] = iBullsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) + iBearsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8);
g_ibuf_104[li_8] = iBullsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8) + iBearsPower(NULL, 0, g_period_84, PRICE_CLOSE, li_8);
}
}
for (li_8 = 0; li_8 < li_0; li_8++) {
if (iMAOnArray(g_ibuf_104, Bars, g_period_76, 0, MODE_SMA, li_8) >= 0.0) g_ibuf_96[li_8] = iMAOnArray(g_ibuf_104, Bars, g_period_76, 0, MODE_SMA, li_8);
else g_ibuf_100[li_8] = iMAOnArray(g_ibuf_104, Bars, g_period_76, 0, MODE_SMA, li_8);
}
return (0);
}
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---