Price Data Components
Indicators Used
0
Views
0
Downloads
0
Favorites
iBearsBullsfuncs
//+------------------------------------------------------------------+
//| iBearsBullsfuncs.mq4 |
//| Author: paladin80 |
//| E-mail: forevex@mail.ru |
//+------------------------------------------------------------------+
#property copyright "paladin80"
#property link "forevex@mail.ru"
#property library
//--------------------------------------------- iBearsPowerfunc() - start ----------------------------------------------------------
//+----------------------------------------------------------------------------+
//| Input parameters: |
//| Sy - Symbol. |
//| Tf - Timeframe. |
//| BearsPeriod - Period for calculation |
//| Applied_price - Applied price. |
//| Bears_MA_mode - Applied MA method. |
//| Shift - Index of the value taken from the indicator buffer. |
//+----------------------------------------------------------------------------+
double iBearsPowerfunc(string Sy,int Tf,int BearsPeriod,int Applied_price,int Bears_MA_mode,int Shift)
{
double Temp, Bears;
if (Sy=="" || Sy=="0") Sy=Symbol();
Temp=iMA(Sy,Tf,BearsPeriod,0,Bears_MA_mode,Applied_price,Shift);
Bears=iLow(Sy,Tf,Shift)-Temp;
return(Bears);
}
//--------------------------------------------- iBearsPowerfunc() - end ------------------------------------------------------------
//--------------------------------------------- iBullsPowerfunc() - start ----------------------------------------------------------
//+----------------------------------------------------------------------------+
//| Input parameters: |
//| Sy - Symbol. |
//| Tf - Timeframe. |
//| BullsPeriod - Period for calculation |
//| Applied_price - Applied price. |
//| Bulls_MA_mode - Applied MA method. |
//| Shift - Index of the value taken from the indicator buffer. |
//+----------------------------------------------------------------------------+
double iBullsPowerfunc(string Sy,int Tf,int BullsPeriod,int Applied_price,int Bulls_MA_mode,int Shift)
{
double Temp, Bulls;
if (Sy=="" || Sy=="0") Sy=Symbol();
Temp=iMA(Sy,Tf,BullsPeriod,0,Bulls_MA_mode,Applied_price,Shift);
Bulls=iHigh(Sy,Tf,Shift)-Temp;
return(Bulls);
}
//--------------------------------------------- iBullsPowerfunc() - end ------------------------------------------------------------
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
---