久久国产成人av_抖音国产毛片_a片网站免费观看_A片无码播放手机在线观看,色五月在线观看,亚洲精品m在线观看,女人自慰的免费网址,悠悠在线观看精品视频,一级日本片免费的,亚洲精品久,国产精品成人久久久久久久

分享

均線指標

 weewas 2011-05-22
#property  indicator_separate_window
#property  indicator_buffers 3
#property  indicator_color1  Silver
#property  indicator_color2  Red
#property  indicator_color3  Lime
#property  indicator_width1  2
//---- indicator parameters
extern int FastEMA=3;
extern int FastEMA1=5;
extern int SlowEMA=24;
extern int SlowEMA1=408;
//---- indicator buffers
double     DxdnBuffer[];
double     DxdcnSlowBuffer[];
double     DxdcnFastBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+  
int init()
{
   SetIndexStyle(0,DRAW_LINE);//DRAW_HISTOGRAM);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(0,DxdnBuffer); 
   SetIndexBuffer(1,DxdcnSlowBuffer);
   SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,4);
   SetIndexDrawBegin(1,SlowEMA1);
   SetIndexBuffer(2,DxdcnFastBuffer);
  return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence                           |
//+------------------------------------------------------------------+
int start()
{
   SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 4);
   int limit;
   limit = Bars - 50;
   int SlowEMAA = SlowEMA;
   int SlowEMAB = SlowEMA1;
   double opD, opD1;
   //---- macd counted in the 1-st buffer
   double hhh, lll;
   for(int i = limit; i >= 0; i--)
     {
       //尋找某范圍內高低的差值點數(shù)
       SlowEMAA = (High[iHighest(NULL, 0, MODE_HIGH, SlowEMA, i)] -
                   Low[iLowest(NULL, 0, MODE_HIGH, SlowEMA, i)]) / Point;
       SlowEMAB = (High[iHighest(NULL, 0, MODE_HIGH, SlowEMA1, i)] -
                   Low[iLowest(NULL, 0, MODE_HIGH, SlowEMA1, i)]) / Point;
       //用此點數(shù)做MA
       DxdnBuffer[i] = iMA(NULL, 0, SlowEMAA, 0, MODE_SMA, PRICE_CLOSE, i);
       DxdcnSlowBuffer[i] = iMA(NULL, 0, SlowEMAB, 0, MODE_SMA, PRICE_CLOSE, i);
     }
   //判斷交叉
   for(i = limit; i >= 0; i--)
     {
       if(((DxdnBuffer[i] - DxdcnSlowBuffer[i]) > 0) &&
          ((DxdnBuffer[i+2] - DxdcnSlowBuffer[i+2]) < 0) &&
          ((DxdnBuffer[i] - DxdnBuffer[i+2]) > 0))
           DxdcnFastBuffer[i]=DxdnBuffer[i];
       if(((DxdnBuffer[i] - DxdcnSlowBuffer[i]) < 0) &&
          ((DxdnBuffer[i+2] - DxdcnSlowBuffer[i+2]) > 0) &&
          ((DxdnBuffer[i] - DxdnBuffer[i+2]) < 0))
           DxdcnFastBuffer[i] = DxdnBuffer[i];
     }
  }

    本站是提供個人知識管理的網絡存儲空間,,所有內容均由用戶發(fā)布,,不代表本站觀點。請注意甄別內容中的聯(lián)系方式,、誘導購買等信息,,謹防詐騙。如發(fā)現(xiàn)有害或侵權內容,,請點擊一鍵舉報,。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多