要當沖的話
想問盤中警示策略當股價站上當日均價線跟跌破當日均價線的語法要怎麼
請問若要股價突破均價 +20點 或是 2% 可否寫成 ?
if close cross over getfield("均價"+20) then ret = 1
if close cross over getfield("均價"*1.02) then ret = 1
if close cross over getfield("均價")+20 then ret = 1
if close cross over getfield("均價")*1.02 then ret = 1
謝謝老師 解惑 ~
請問 老師 設定3個條件都成立時, 自動買進
1.股價 穿越 均價
2.股價 穿越 均價+15
3.股價 穿越 均線
下列 程式寫法 卻一直run 不出來 請教老師 哪邊有寫的 不對地方 ~
avgValue = Average(close,5);
long_condition = close cross over getfield("均價");
if Position = 0
and long_condition
and close > getfield("均價")+15
and close > avgValue
then begin SetPosition(1,MARKET);
end;
好喔 謝謝老師 來試試看 ~
好喔 來試試看 ~ 謝謝小編
9 評論