炒期貨不僅要了解基本面分析,還要掌握一些技術(shù)分析的知識(shí),那么常見的一些交易指標(biāo)在前面我們已經(jīng)分享過原理、優(yōu)缺點(diǎn)及使用方法。接下來一起探討編程文華6指標(biāo)源碼編寫。 鱷魚線組成 由三條移動(dòng)平均線組成,它們分別是: 3、嘴唇線(Lips Line):使用周期為5的簡(jiǎn)單移動(dòng)平均線,通常標(biāo)記為藍(lán)色線。 鱷魚線使用 當(dāng)下顎線、齒線和嘴唇線按照順序排列并向上傾斜時(shí),表示市場(chǎng)處于上漲趨勢(shì); 當(dāng)下顎線、齒線和嘴唇線按照順序排列并傾斜向下時(shí),表示市場(chǎng)處于下降趨勢(shì); 當(dāng)下顎線、齒線和嘴唇線相互交叉時(shí),可能預(yù)示著趨勢(shì)即將結(jié)束,交易者可以考慮平倉(cāng)或調(diào)整策略。 下圖展示的是根據(jù)常見的方式改編而成的期貨技術(shù)分析指標(biāo)鱷魚線(Alligator Indicator),適用于文華6軟件。 在實(shí)際應(yīng)用中,鱷魚線作為一種技術(shù)分析指標(biāo),建議結(jié)合其他技術(shù)分析工具和市場(chǎng)情況進(jìn)行綜合研判,以增加準(zhǔn)確性和穩(wěn)定性。 下面分享的鱷魚線(Alligator Indicator)指標(biāo)源碼僅作為策略思路拓展,不建議直接用于期貨、外匯等投資實(shí)盤中(投資有風(fēng)險(xiǎn),入市須謹(jǐn)慎)。交易員可以根據(jù)艾云策略所提供的指標(biāo)源碼,結(jié)合平時(shí)的交易經(jīng)驗(yàn)進(jìn)行改編,形成自己的交易策略。 Y:=(HIGH+LOW)/2; AO : =MA(Y ,5 )-MA(Y ,34 ); AO1:=REF(AO,1); AC:=AO-MA( AO,5); AC1:=REF(AC,1); E:REF(SMA(Y,13,1),8); CHI:REF(SMA(Y,8,1),5),COLORRED; CHUN:REF(SMA(Y,5,1),3),COLORYELLOW; STICKLINE(AO1>AO && AC1>AC && CLOSE<OPEN ,OPEN ,CLOSE ,COLORYELLOW ,0 ); DRAWLINE(AO1>AO && AC1>AC && CLOSE<OPEN ,HIGH ,AO1>AO && AC1>AC && CLOSE<OPEN ,LOW ,COLORYELLOW); STICKLINE(AO1>AO && AC1>AC && CLOSE=OPEN ,OPEN ,CLOSE ,COLORYELLOW ,0 ); DRAWLINE(AO1>AO && AC1>AC && CLOSE=OPEN ,HIGH ,AO1>AO && AC1>AC && CLOSE=OPEN ,LOW ,COLORYELLOW); STICKLINE(AO1>AO && AC1>AC && CLOSE>OPEN ,OPEN ,CLOSE ,COLORYELLOW ,1); DRAWLINE(AO1>AO && AC1>AC && CLOSE>OPEN,HIGH ,AO1>AO && AC1>AC && CLOSE>OPEN,CLOSE,COLORYELLOW ); DRAWLINE(AO1>AO && AC1>AC && CLOSE>OPEN,LOW ,AO1>AO && AC1>AC && CLOSE>OPEN,OPEN ,COLORYELLOW ); STICKLINE(AO1<AO && AC1<AC && CLOSE<OPEN,OPEN ,CLOSE ,COLORRED ,0 ); DRAWLINE(AO1<AO && AC1<AC && CLOSE<OPEN,HIGH,AO1<AO && AC1<AC && CLOSE<OPEN,LOW ,COLORRED ); STICKLINE(AO1<AO && AC1<AC && CLOSE=OPEN ,OPEN ,CLOSE ,COLORRED ,0 ); DRAWLINE(AO1<AO && AC1<AC && CLOSE=OPEN ,HIGH ,AO1<AO && AC1<AC && CLOSE=OPEN,LOW ,COLORRED); STICKLINE(AO1<AO && AC1<AC && CLOSE>OPEN,OPEN ,CLOSE ,COLORRED,1); DRAWLINE(AO1<AO && AC1<AC && CLOSE>OPEN,HIGH ,AO1<AO && AC1<AC && CLOSE>OPEN,CLOSE,COLORRED); DRAWLINE(AO1<AO && AC1<AC && CLOSE>OPEN,LOW ,AO1<AO && AC1<AC && CLOSE>OPEN,OPEN ,COLORRED); STICKLINE(AO1>AO && AC1<AC && CLOSE<OPEN ,OPEN ,CLOSE ,COLORCYAN ,0 ); DRAWLINE(AO1>AO && AC1<AC && CLOSE<OPEN,HIGH ,AO1>AO && AC1<AC && CLOSE<OPEN,LOW ,COLORCYAN ); STICKLINE(AO1>AO && AC1<AC && CLOSE=OPEN,OPEN ,CLOSE ,COLORCYAN ,0 ); DRAWLINE(AO1>AO && AC1<AC && CLOSE=OPEN,HIGH ,AO1>AO && AC1>AC && CLOSE=OPEN,LOW ,COLORCYAN ); STICKLINE(AO1>AO && AC1<AC && CLOSE>OPEN,OPEN ,CLOSE ,COLORCYAN ,1 ); DRAWLINE(AO1>AO && AC1<AC && CLOSE>OPEN ,HIGH ,AO1>AO && AC1<AC && CLOSE>OPEN,CLOSE ,COLORCYAN ); DRAWLINE(AO1>AO && AC1<AC && CLOSE>OPEN,LOW ,AO1>AO && AC1<AC && CLOSE>OPEN,OPEN ,COLORCYAN ); STICKLINE(AO1<AO && AC1>AC && CLOSE<OPEN,OPEN ,CLOSE ,COLORCYAN ,0 ); DRAWLINE(AO1<AO && AC1>AC && CLOSE<OPEN,HIGH ,AO1<AO && AC1>AC && CLOSE<OPEN,LOW ,COLORCYAN ); STICKLINE(AO1<AO && AC1>AC && CLOSE=OPEN,OPEN ,CLOSE ,COLORCYAN ,0 ); DRAWLINE(AO1<AO && AC1>AC && CLOSE=OPEN,HIGH,AO1<AO && AC1>AC && CLOSE=OPEN,LOW ,COLORCYAN ); STICKLINE(AO1<AO && AC1>AC && CLOSE>OPEN,OPEN ,CLOSE ,COLORCYAN ,1 ); DRAWLINE(AO1<AO && AC1>AC && CLOSE>OPEN,HIGH ,AO1<AO && AC1>AC && CLOSE>OPEN,CLOSE ,COLORCYAN ); DRAWLINE(AO1<AO && AC1>AC && CLOSE>OPEN,LOW ,AO1<AO && AC1>AC && CLOSE>OPEN,OPEN ,COLORCYAN ); 艾云淺談 |
|