发表于:2006-12-11 19:59只看该作者
2楼
你要的是不是 bolling B%,===================================
//+------------------------------------------------------------------+
//| Bolling b% .mq4 |
//| Copyright ?2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- input parameters
extern int BandPeriod=21;
extern int Deviation=2;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(4);
//---- 3 additional buffers are used for counting.
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexBuffer(2, ExtMapBuffer3);
SetIndexBuffer(3, ExtMapBuffer4);
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//---- TODO: add your code here
int limit;
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//----
for(int i=0; i
韬客外汇论坛TALKFOREX.COM
发表于:2006-12-15 02:32只看该作者
3楼
看了《布林线》,II%是指当日交易密度,指标可参考如下,但是21日我没怎么搞懂,
是不是求21日的平均?你知道的话,可以用中文说明,然后我帮你编。
//+------------------------------------------------------------------+
//| II%.mq4 |
//| Copyright ?2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_separate_window
//#property indicator_minimum -1
//#property indicator_maximum 2
//#property indicator_level3 10
//#property indicator_level4 30
#property indicator_level5 0
#property indicator_buffers 1
//---- input parameters
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
double ExtMapBuffer5;
double ExtMapBuffer6;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(8);
//---- 1 additional buffers are used for counting.
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//---- indicator buffers mapping
//if(!SetIndexBuffer(0,ExtMapBuffer1) && !SetIndexBuffer(1,ExtMapBuffer2))
// Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("II%");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//---- TODO: add your code here
int limit;
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//----
for(int i=0; i
韬客外汇论坛TALKFOREX.COM
发表于:2006-12-15 02:37只看该作者
4楼
ExtMapBuffer1=(2*Close-High-Low)*Volume/(High-Low);
在每个单词后加“中括号i中括号”
韬客外汇论坛TALKFOREX.COM
5楼
TOM哥,我要的就是II%指标,你能把完整的贴给我吗?以摆动形式体现的
韬客社区www.talkfx.co
发表于:2013-12-15 10:58只看该作者
8楼
韬客社区www.talkfx.co
发表于:2013-12-15 11:07只看该作者
9楼
韬客社区www.talkfx.co