0
Views
0
Downloads
0
Favorites
CandleBodyPrcnt
//+------------------------------------------------------------------+
//| CandleBodyPrcnt.mq4 |
//| Copyright © 2008, Ronald Verwer / Forex MetaSoft |
//| http://www.forexmetasoft.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Ronald Verwer / Forex MetaSoft"
#property link "http://www.forexmetasoft.com"
int i;
double prcnt,OverAllPercent;
//+------------------------------------------------------------------+
//| script initialization function |
//+------------------------------------------------------------------+
int init()
{
Comment("");
}
//+------------------------------------------------------------------+
//| script execution function |
//+------------------------------------------------------------------+
int start()
{
for(i=Bars;i>=0;i--)
{
if(High[i]-Low[i]>0)
prcnt+=((MathAbs(Open[i]-Close[i]))/(High[i]-Low[i]))*100;
}
OverAllPercent=prcnt/(Bars+1);
Comment("\nAverage Candle Body of the "+Symbol()+" currency pair is "+DoubleToStr(OverAllPercent,2)+"%");
//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
---