发表于:2006-10-13 03:37只看该作者
2楼
先在主图放一个MA,然后再加一个MA,参数里面选择“First Indicator's Data”
韬客社区www.talkfx.co
3楼
谢谢
韬客社区www.talkfx.co
发表于:2006-10-13 12:42只看该作者
4楼
//+------------------------------------------------------------------+
//| Ma10-10.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_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Magenta
//---- input parameters
extern int MA_Period1=3;
extern int MA_Period2=5;
extern int MA_Period3=10;
extern int MA_Period4=24;
extern int MA_Period5=48;
extern int MA_Period6=120;
//extern int MA_Period7=240;
//extern int MA_Period8=480;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
double ExtMapBuffer5;
double ExtMapBuffer6;
double ExtMapBuffer7;
double ExtMapBuffer8;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(8);
//---- 1 additional buffers are used for counting.
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
IndicatorShortName("Ma10-10");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i
韬客外汇论坛TALKFOREX.COM
发表于:2006-10-13 13:21只看该作者
5楼
//+------------------------------------------------------------------+
//| Ma10-10.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_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Magenta
//---- input parameters
extern int MA_Period1=3;
extern int MA_Period2=5;
extern int MA_Period3=10;
extern int MA_Period4=24;
extern int MA_Period5=48;
extern int MA_Period6=120;
//extern int MA_Period7=240;
//extern int MA_Period8=480;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
double ExtMapBuffer5;
double ExtMapBuffer6;
double ExtMapBuffer7;
double ExtMapBuffer8;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(8);
//---- 1 additional buffers are used for counting.
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
IndicatorShortName("Ma10-10");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int limit;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i
发表于:2008-12-03 09:47只看该作者
6楼
正解:) :) :)
韬客社区www.talkfx.co