log in     sign up for free
 
In addition, you should also have some idea about how you plan to take profits and a strategy for letting your profits run.
Van K. Tharp
 
 
Home
systems (285)
 
 
Special offer: buy AmiBroker and EOD+Real-Time Data
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

Chaikin's Volatility

Formula for: MetaTrader

mql4 indicator

 

 

Views:  3189

Added: February 04, 2007
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5

3

1 ratings
 

email this link

 
 
Tags: MetaTrader, mql4 indicator
 


So I decided to add another line to Chaikin volatility and here the result. Very useful. Thank you for the idea. Just a reminder, even before down trend we will see the indicators lines going up.

 

 



Code:

//+------------------------------------------------------------------+
//| Chaikin's Volatility.mq4 |
//| Kalenzo |
//| bartlomiej.gorski@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link "bartlomiej.gorski@gmail.com"

#property indicator_separate_window
#property indicator_buffers 5
#property indicator_color1 Red
#property indicator_color2 Blue

//---- input parameters
extern int iPeriod=13;
extern int maPeriod=13;
extern int maSlowPeriod=26;

//---- buffers
double chakin[];
double Slowchakin[];
double hl[];
double emahl[];
double Slowemahl[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorBuffers(5);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,chakin);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,Slowchakin);

SetIndexStyle(2,DRAW_NONE);
SetIndexBuffer(2,hl);
SetIndexStyle(3,DRAW_NONE);
SetIndexBuffer(3,emahl);
SetIndexStyle(4,DRAW_NONE);
SetIndexBuffer(4,Slowemahl);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars<0) counted_bars=0;
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//----
for(int c = 0 ;c <= limit ;c++) hl[c]=High[c]-Low[c];
for(int e = 0 ;e <= limit ;e++)
{
emahl[e]= iMAOnArray(hl,0,maPeriod,0,MODE_EMA,e);
Slowemahl[e]= iMAOnArray(hl,0,maSlowPeriod,0,MODE_EMA,e);
}

for(int i = 0 ;i <= limit-20 ;i++)
{

chakin[i] = ( (emahl[i]-emahl[i+iPeriod])/emahl[i+iPeriod] ) *100;
Slowchakin[i] = ( (Slowemahl[i]-Slowemahl[i+iPeriod])/Slowemahl[i+maSlowPeriod] ) *100;
}
//----
return(0);
}
//+------------------------------------------------------------------+


 





Code to difficult? Find somebody to help you with coding here.

 



Author: Kalenzo bartlomiej.gorski (at) gmail.com
Source: http://www.forex-tsd.com

 

View similar (mql4 indicator for MetaTrader):

DS_Stochastic
3D Oscilator
ATR Ratio
3 Line Break
ADX Crossing
Inside Bar
Super-Signals
Avg Daily Range
ATR
5_34_5
...
 
 
all formulas for MetaTrader
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
PayPalSecure payments by PayPal S4T™ is a part of TAURO EDUCATION NETWORK
 
Privacy note | (c) copyrights systems4trading.com 2006-2009