请牛大帮忙修改ATR指标,使其能显示3条线
请牛大帮忙修改ATR指标,使其能显示3条线,5日ATR,10ATR,20ATR//+------------------------------------------------------------------+
//| ATR.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright \"Copyright ?2005, MetaQuotes Software Corp.\"
#property link \"http://www.metaquotes.net/\"
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
//---- input parameters
extern int AtrPeriod=14;
//---- buffers
double AtrBuffer[];
double TempBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- 1 additional buffer used for counting.
IndicatorBuffers(2);
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,AtrBuffer);
SetIndexBuffer(1,TempBuffer);
//---- name for DataWindow and indicator subwindow label
short_name=\"ATR(\"+AtrPeriod+\")\";
IndicatorShortName(short_name);
SetIndexLabel(0,short_name);
//----
SetIndexDrawBegin(0,AtrPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Average True Range |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
if(Bars 回复一下 不错啊! 一个字牛啊! 厉害!强~~~~没的说了! 给推荐一个好的平台,这样EA才能很好的发挥啊 我来了~~~~~~~~~ 闪人~~~~~~~~~~~~~~~~ 感谢分享 看看是什么东西啊 EA真的能赚钱么? xiexiefenxiang
页:
[1]
2