相關標簽:期貨交易止損的重要性,黃金交易怎樣設止損,期貨交易怎么設止損單,外匯交易止損,自動止損止盈交易軟件,趨勢交易波動止損法,證券交易賬號范例,惠比特交易和配種專區,夢三國交易專區,
模型策略源碼:VARIABLE: aspect=0; //初始化假定做多頭 VARIABLE: stopprice=0;//止損價格變量 VARIABLE: stopnum = 10; //止損價差 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 //處理移動的底部 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 //處理移動的底部 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)); 點擊復制上述代碼粘貼到到公式管理器
{別忘了將本網告訴您身邊的朋友,向朋友傳達有用資料,也是一種人情,你朋友會感謝你的。}