|
|
为什么窗口中什么都没有?请指点!
- #property indicator_separate_window
- #property indicator_buffers 1
- #property indicator_color1 Green
- double sma[];
- //+------------------------------------------------------------------+
- //| Custom indicator initialization function |
- //+------------------------------------------------------------------+
- int init()
- {
- //---- indicators
- SetIndexStyle(0,DRAW_LINE);
- SetIndexBuffer(0,sma);
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator deinitialization function |
- //+------------------------------------------------------------------+
- int deinit()
- {
- return(0);
- }
- //+------------------------------------------------------------------+
- //| Custom indicator iteration function |
- //+------------------------------------------------------------------+
- int start()
- {
- int i,limit,counted_bars=IndicatorCounted();
- //----
- {
-
- for( i=0; i<limit; i++)
- sma[i]=iMA(NULL,0,250,0,MODE_SMA,PRICE_CLOSE,i);
- }
- //----
- return(0);
- }
- //+------------------------------------------------------------------+
复制代码 |
|