秃鹫老师您好:
秃鹫老师您好:麻烦编个公式.
我代码有问题,您看问题在哪里啊?
//+------------------------------------------------------------------+
//| 会变色的均线3.mq4 |
//| Copyright 2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2008, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
double Buffer1;
double Buffer2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
double HH,LL;
int limit;
SetIndexBuffer(0,HH);
SetIndexBuffer(1,LL);
//IndicatorBuffers(3);
SetIndexStyle(0,DRAW_LINE,0,1);
SetIndexStyle(1,DRAW_LINE,0,1);
//---- get Moving Average
HH=iMA(NULL,0,20,0,MODE_EMA,PRICE_HIGH,0);
LL=iMA(NULL,0,20,0,MODE_EMA,PRICE_LOW,0);
return(0);
}
提示 Start function not found and cannot be run.
发表于:2008-10-06 01:08只看该作者
2楼
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Green
extern int EMA=20;
double Buffer1;
double Buffer2;
void init() {
SetIndexBuffer(0,Buffer1);
SetIndexBuffer(1,Buffer2);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
}
void start() {
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int t=0; t
3楼
多谢指导!
韬客社区www.talkfx.co