发表于:2008-07-03 03:27只看该作者
2楼
我自己用四周法则的指标定区间与突破,跟boll类似,但是自我感觉比std方式的上下限更简单实用,突破更有效一些//+------------------------------------------------------------------+
//| MrBean.mq4 |
//| Copyright ?2004, Fourway Software Corp. |
//| http://www.fourway.com |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, Fourway Software Corp."
#property link "http://www.fourway.com"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 DarkSalmon
#property indicator_color2 CornflowerBlue
//---- input parameters
extern int ExtParam1=20;
extern int ExtParam2=20;
extern int PriceMode=0;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexDrawBegin(1,ExtParam1);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(1,ExtParam2);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- 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区间.gif
韬客社区www.talkfx.co
发表于:2008-07-03 03:49只看该作者
3楼
你要的指标://+------------------------------------------------------------------+
//| MrBean.mq4 |
//| Copyright ?2004, Fourway Software Corp. |
//| http://www.fourway.com |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, Fourway Software Corp."
#property link "http://www.fourway.com"
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color2 DarkSalmon
#property indicator_color3 CornflowerBlue
#property indicator_color4 Green
//---- input parameters
extern int ExtParam1=10;
extern int ExtParam2=20;
extern int ExtParam3=40;
//---- buffers
double ExtMapBuffer0;
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_NONE);
SetIndexBuffer(0,ExtMapBuffer0);
SetIndexStyle(1,DRAW_LINE);
SetIndexDrawBegin(1,ExtParam1);
SetIndexBuffer(1,ExtMapBuffer1);
SetIndexStyle(2,DRAW_LINE);
SetIndexDrawBegin(2,ExtParam2);
SetIndexBuffer(2,ExtMapBuffer2);
SetIndexStyle(3,DRAW_LINE);
SetIndexDrawBegin(3,ExtParam3);
SetIndexBuffer(3,ExtMapBuffer3);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- 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; ijx.gif
韬客社区www.talkfx.co
4楼
太感动,太感谢了。。
韬客社区www.talkfx.co
5楼
很好用。。谢谢
[ 本帖最后由 姬玄 于 2008-7-3 17:05 编辑 ]
韬客社区www.talkfx.co