mt4布林線改進(jìn)版源碼_第1頁
mt4布林線改進(jìn)版源碼_第2頁
mt4布林線改進(jìn)版源碼_第3頁
mt4布林線改進(jìn)版源碼_第4頁
全文預(yù)覽已結(jié)束

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、#property indicator_chart_window#property indicator_buffers 6#property indicator_color1 Blue#property indicator_color2 Yellow#property indicator_color3 RoyalBlue#property indicator_color4 Red#property indicator_color5 RoyalBlue#property indicator_color6 Redextern int布周期 = 20;extern int布偏差 = 1;extern

2、 double 資金風(fēng)險(xiǎn)系數(shù)= 1.00;/ Offset Factorextern int顯示信號樣式= 2;/ Display signals mode: 1-Signals & Stops; 0-onlyStops; 2-only Signals;extern int顯示樣線 = 1;/ Display line mode: 0-no, 1-yesextern int計(jì)算棒數(shù) = 2000;extern bool使用報(bào)警 = false;double 漲趨勢箭 ;double 跌趨勢箭 ;double 漲信號箭 ;double 跌信號箭 ;double 藍(lán)漲線 ;double 紅跌線 ;

3、bool已報(bào)漲 = false;bool已報(bào)跌 = false;/-+int init()string 簡稱 ;SetIndexBuffer(0,漲趨勢箭 );SetIndexBuffer(1,跌趨勢箭 );SetIndexBuffer(2,漲信號箭 );SetIndexBuffer(3,跌信號箭 );SetIndexBuffer(4,藍(lán)漲線 );SetIndexBuffer(5,紅跌線 );SetIndexStyle(0, DRAW_ARROW, 0, 1);SetIndexStyle(1, DRAW_ARROW, 0, 1);SetIndexStyle(2, DRAW_ARROW, 0,

4、1);SetIndexStyle(3, DRAW_ARROW, 0, 1);SetIndexStyle(4, DRAW_LINE);SetIndexStyle(5, DRAW_LINE);SetIndexArrow(0, 159);SetIndexArrow(1, 159);SetIndexArrow(2, 233);SetIndexArrow(3, 234);IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS);簡稱 = BBands Stop(+ 布周期 +, + 布偏差 +);IndicatorShortName( 簡稱 );SetIndex

5、Label(0, UpTrend Stop);SetIndexLabel(1, DownTrend Stop);SetIndexLabel(2, UpTrend信號 );SetIndexLabel(3, DownTrend信號 );SetIndexLabel(4, UpTrend線 );SetIndexLabel(5, DownTrend線 );SetIndexDrawBegin(0,布周期 );SetIndexDrawBegin(1,布周期 );SetIndexDrawBegin(2,布周期 );SetIndexDrawBegin(3,布周期 );SetIndexDrawBegin(4,布周

6、期 );SetIndexDrawBegin(5,布周期 );return(0);/-+int start()intdoublei,趨勢 ;布上軌 25000,布下軌25000,布外上軌25000,布外下軌25000;for(i= 計(jì)算棒數(shù) ; i=0; i-)漲趨勢箭 i= 0;跌趨勢箭 i= 0;漲信號箭 i= 0;跌信號箭 i= 0;藍(lán)漲線 i= EMPTY_V紅跌線 i= EMPTY_VALUE;ALUE;for(i= 計(jì)算棒數(shù)/- 指標(biāo)-布周期-1; i=0; i-)布上軌 i= iBands(NULL, 0, 布周期 , 布偏差 , 0, PRICE_CLOSE, MODE_UPPE

7、R, i); 布下軌 i= iBands(NULL, 0, 布周期 , 布偏差 , 0, PRICE_CLOSE, MODE_LOWER, i);/- 價(jià)格所在趨勢if(Closei 布上軌 i+1)趨勢=1;if(Closei0 &布下軌 i 布下軌 i+1)布下軌 i=布下軌 i+1;/-if( 趨勢 布上軌 i+1)布上軌 i=布上軌 i+1;/- 外軌布外上軌 i= 布上軌 i+0.5*( 資金風(fēng)險(xiǎn)系數(shù) -1)*( 布上軌 i- 布下軌 i); 布外下軌 i= 布下軌 i-0.5*( 資金風(fēng)險(xiǎn)系數(shù) -1)*( 布上軌 i- 布下軌 i);/- 趨勢為上時(shí),外下軌同樣只允上移if( 趨勢

8、 0 &布外下軌 i 布外下軌 i+1)布外下軌 i=布外下軌 i+1;/-if( 趨勢 布外上軌 i+1)布外上軌 i=布外上軌 i+1;/- 趨勢向上時(shí)if( 趨勢 0)/- 前一漲趨箭為-1 時(shí)if( 顯示信號樣式 0 &漲趨勢箭 i+1=-1.0)漲信號箭 i=布外下軌 i;漲趨勢箭 i=布外下軌 i;/- 顯示線if( 顯示樣線 0)藍(lán)漲線 i=布外下軌 i;/- 報(bào)警if( 使用報(bào)警 =true & i=0 &已報(bào)漲 =false)Alert(BBands going Up on , Symbol(), -, Period();已報(bào)漲 = true;已報(bào)跌 = false;/-else漲趨勢箭 i=布外下軌 i;if( 顯示樣線 0)藍(lán)漲線 i=布外下軌 i;漲信號箭 i= -1;if( 顯示信號樣式 =2)漲趨勢箭 i= 0;跌信號箭 i= -1;跌趨勢箭 i= -1.0;紅跌線 i= EMPTY_V ALUE;/- 趨勢向下時(shí)if( 趨勢 0 &跌趨勢箭 i+1=-1.0)跌信號箭 i=布外上軌 i;跌趨勢箭 i=布外上軌 i;if( 顯示樣線 0)紅跌線 i=布外上軌 i;if( 使用報(bào)警 =true & i=0 &已報(bào)跌 =false)Alert(BBands going Down on , Symbol(), -, Period();已報(bào)跌 = true;已

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論