相關(guān)標(biāo)簽:期貨交易止損的重要性,黃金交易怎樣設(shè)止損,期貨交易怎么設(shè)止損單,外匯交易止損,自動(dòng)止損止盈交易軟件,趨勢(shì)交易波動(dòng)止損法,證券交易賬號(hào)范例,惠比特交易和配種專區(qū),夢(mèng)三國(guó)交易專區(qū),
模型策略源碼:VARIABLE: aspect=0; //初始化假定做多頭 VARIABLE: stopprice=0;//止損價(jià)格變量 VARIABLE: stopnum = 10; //止損價(jià)差 RUNMODE:0; //工作于逐周期模式 if barpos = 0 then stopprice := l - stopnum; if aspect = 0 then begin //多頭處理 if l <= stopprice then begin //多反空 aspect:= 1; stopprice := h+stopnum; end //處理移動(dòng)的底部 if l - stopnum > stopprice then stopprice := l-stopnum; end if aspect = 1 then begin //空頭處理 if h >= stopprice then begin //空反多 aspect:= 0; stopprice := l-stopnum; end //處理移動(dòng)的底部 if h + stopnum < stopprice then stopprice := h+stopnum; end //畫線 PARTLINE( aspect = 0, stopprice , colorrgb(255,0,0)); PARTLINE( aspect = 1, stopprice , colorrgb(0,255,0)); 點(diǎn)擊復(fù)制上述代碼粘貼到到公式管理器
{別忘了將本網(wǎng)告訴您身邊的朋友,向朋友傳達(dá)有用資料,也是一種人情,你朋友會(huì)感謝你的。}