//+------------------------------------------------------------------+ //| 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); } //+------------------------------------------------------------------+
Sample
Analysis
Market Information Used:
Series array that contains close prices for each bar
Series array that contains open prices of each bar
Series array that contains tick volumes of each bar
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Custom Indicators Used:
Order Management characteristics:
Other Features: