|
我刚开始学习编写指标,想把一个通达信简单的平滑ma通道指标转成mt4的,通过修改mt4自带的ma指标,现在可以画出1条14期的smma了,我想要以这条14smma为基础乘以不同的参数得到不同的几条线(好像和14smma平行),形成一个通道,到这里我该怎么写呢,去学习了视频编程,第贰课没有声音,继续不了了,只好来这里寻求大家的帮助,目前的代码如下//+------------------------------------------------------------------+ //| Custom Moving Average.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 1 #property indicator_color1 Yellow //---- indicator parameters extern int MA_Period=14; extern int MA_Shift=0; extern int MA_Method=0; //---- indicator buffers double ExtMapBuffer[]; //---- int ExtCountedBars=0; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { int draw_begin; string short_name; //---- drawing settings SetIndexStyle(0,DRAW_LINE); SetIndexShift(0,MA_Shift); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); if(MA_Period |
EA发布区