论坛风格切换切换到宽版
  • 252阅读
  • 0回复

[*待分类帖*]求助 MathMin 得不到最小值 [复制链接]

上一主题 下一主题
离线sewen
 

发帖
17
金钱
48
威望
254
贡献
87
交易币
15
//+------------------------------------------------------------------+ &DqE{bBd!  
//|                                                     Display .mq4 | k6`6Mjbc  
//|                                                                  | 3+ >G#W~  
//|                                                                  | +C7 ~b~ %  
//+------------------------------------------------------------------+ 9rh}1eo7  
BL@:!t  
@aJ!PV'ms  
#property indicator_chart_window 8* Jw0mSw  
#property indicator_buffers 1 s3Cc;#  
#property indicator_color1 Red ETs>`#`6o  
#property indicator_width1 1 /VG2.:  
pW4 cX  
//---- indicator buffers CdL< *AH  
N&@}/wzZ  
~/j\Z  
double TodayOpenBuffer[]; ^pHq66d%Z  
A_KW(;50  
3G kv4,w<  
//---- input parameters Dc)dE2  
B#9{-t3Vf  
//+------------------------------------------------------------------+ ;J7F J3n  
//| Custom indicator initialization function                         | K(aJi,e>  
//+------------------------------------------------------------------+ 3po:xMY  
int init() bV"G~3COy  
{ !F?XLekTi  
      SetIndexStyle(0,DRAW_LINE,STYLE_SOLID); K<>sOWZ'S  
    SetIndexBuffer(0,TodayOpenBuffer); ]kboG%Dl?9  
?Q&yEGm(  
    SetIndexEmptyValue(0,0.0); rXHv`k y  
     0x!2ihf  
3)RsLI9  
+U@<\kIF  
/Ju;MeE9  
   return(0); FJd]D[h  
} /:FOPPs  
//+------------------------------------------------------------------+ % $DI^yS  
//| Custom indicator deinitialization function                       | ~^cMys |'  
//+------------------------------------------------------------------+ `Ry]y"K  
int deinit() C7O6qpO  
  { u#@Q:tnN_  
//---- pf7it5  
   ObjectsDeleteAll(); ~JH:EB:  
//---- P$-X)c$&  
   return(0); D~\$~&_]=  
  } lO_UPC\@fw  
//+------------------------------------------------------------------+ j ku}QM^  
//| Custom indicator iteration function                              | l c '=mA  
//+------------------------------------------------------------------+ q')R4=0 K  
qC?:*CXH  
int start() HF.^ysI  
{ [bk?!0]aV  
  int lastbar; AD<q%pu&H?  
   int counted_bars= IndicatorCounted(); a qc?pqM  
   sK5r$Dbr  
   if (counted_bars>0) counted_bars--; Os1>kwC  
   lastbar = Bars-counted_bars;     oczN5YSt  
   DailyOpen(0,lastbar); dp*u9z~NA  
   W!>.$4Q9  
   9Q+'n$s0^  
>\Ww;1yV  
}  D 'Zt  
@0u~?!g@  
^kB8F"X  
//+------------------------------------------------------------------+ 0p!>JQ]m  
@-!}BUs?  
int DailyOpen(int offset, int lastbar) uW} s)j.  
{ j4uvS!  
   int shift; Qh'ATo  
   int  k,counter; ?1K#dC52#  
   ei[j1F  
    for(shift=lastbar;shift>=offset;shift--){ KQg]0y d  
       if(TimeYear(Time[shift]) != TimeYear(Time[shift+1]))       LH8 fBhw  
       {   for (counter=k ;counter<=k+11;counter++) K)DDk9*  
           {TodayOpenBuffer[shift]=MathMin( Low[shift-counter],TodayOpenBuffer[shift]);        //就是这句 <#u=[_H  
         TodayOpenBuffer[shift+1]= 0;           }     A Sk|A!  
       } 1]@}|  
       else{ JS CZ{v J$  
         TodayOpenBuffer[shift]= TodayOpenBuffer[shift+1];       #/Vh|UeX  
      } I uMQ9 &  
   }   0"\H^  
      return(0); o4K ~  
} gT0BkwIV  
SEGri#s  
di6QVRj1  
放月周期   谢谢  帮助  
 

  • 在线咨询
  • 400-881-0680