[MT4指标]BW 成交量指标
附图指标,BW 成交量指标 说是利用了成交量来算的
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| BW Market Facilitation Index.mq4 |
//| Copyright 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
//---- indicator settings
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_buffers 5
#property indicator_color1 Black
#property indicator_color2 Lime
#property indicator_color3 SaddleBrown
#property indicator_color4 Blue
#property indicator_color5 Pink
#property indicator_width2 2
#property indicator_width3 2
#property indicator_width4 2
#property indicator_width5 2
//---- indicator buffers
double ExtMFIBuffer;
double ExtMFIUpVUpBuffer;
double ExtMFIDownVDownBuffer;
double ExtMFIUpVDownBuffer;
double ExtMFIDownVUpBuffer;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator buffers mapping
SetIndexBuffer(0,ExtMFIBuffer);
SetIndexBuffer(1,ExtMFIUpVUpBuffer);
SetIndexBuffer(2,ExtMFIDownVDownBuffer);
SetIndexBuffer(3,ExtMFIUpVDownBuffer);
SetIndexBuffer(4,ExtMFIDownVUpBuffer);
//---- drawing settings
SetIndexStyle(0,DRAW_NONE);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexStyle(3,DRAW_HISTOGRAM);
SetIndexStyle(4,DRAW_HISTOGRAM);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("BW MFI");
SetIndexLabel(0,"BW MFI");
SetIndexLabel(1,NULL);
SetIndexLabel(2,NULL);
SetIndexLabel(3,NULL);
SetIndexLabel(4,NULL);
//---- sets drawing line empty value
SetIndexEmptyValue(0, 0.0);
SetIndexEmptyValue(1, 0.0);
SetIndexEmptyValue(2, 0.0);
SetIndexEmptyValue(3, 0.0);
SetIndexEmptyValue(4, 0.0);
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| BW Market Facilitation Index |
//+------------------------------------------------------------------+
int start()
{
int i,nLimit,nCountedBars;
bool bMfiUp=true,bVolUp=true;
//---- bars count that does not changed after last indicator launch.
nCountedBars=IndicatorCounted();
//---- last counted bar will be recounted
if(nCountedBars>0) nCountedBars--;
nLimit=Bars-nCountedBars;
//---- Market Facilitation Index calculation
for(i=0; i1)
{
//---- analyze previous bar before recounted bar
i=nLimit+1;
if(ExtMFIUpVUpBuffer!=0.0)
{
bMfiUp=true;
bVolUp=true;
}
if(ExtMFIDownVDownBuffer!=0.0)
{
bMfiUp=false;
bVolUp=false;
}
if(ExtMFIUpVDownBuffer!=0.0)
{
bMfiUp=true;
bVolUp=false;
}
if(ExtMFIDownVUpBuffer!=0.0)
{
bMfiUp=false;
bVolUp=true;
}
}
//---- dispatch values between 4 buffers
for(i=nLimit-1; i>=0; i--)
{
if(iExtMFIBuffer[i+1]) bMfiUp=true;
if(ExtMFIBufferVolume[i+1]) bVolUp=true;
if(VolumeBW_MFI.jpg
发表于:2021-06-30 09:06只看该作者
2楼
感謝分享BW 成交量指标
韬客社区www.talkfx.co