Miscellaneous
2
Views
0
Downloads
0
Favorites
TheTick
//+------------------------------------------------------------------+
//| TheTick.mq4 |
//| Patrick Nouvion |
//| http://www.interbankfx.com |
//+------------------------------------------------------------------+
#property copyright "Patrick Nouvion"
#property link "http://www.interbankfx.com"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue
double TheTick[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,TheTick);
SetIndexDrawBegin(0,5);
SetLevelStyle(1,1,Black);
SetLevelValue(0, 0.0);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//---- Loop Prep
int Limit; int Count; int PrevDay;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1); // Check for error
if(counted_bars>0) counted_bars--; // Last counted bar will be recounted
Limit = Bars-counted_bars;
double Multiplier = 0;
if( StringFind( Symbol(), "JPY", 0) != -1 )
{
Multiplier = 0.1;
}
else
{
Multiplier = 100.0;
}
for( int i = 0; i < Limit; i++ )
{
TheTick[i] = ( ( Close[i] - Open[i] ) * Volume[i] ) * Multiplier ;
}
//----
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
---