臺指期通道突破策略NO.2(程式碼)
程式碼:
Vars:hl(0),avr(0) ;
hl=h-l;
avr = Average(hl, 25);
If avr > avr [1] Then Buy next bar on Highest(High, 35)[1] Stop;
If avr > avr [1] Then Sellshort next bar on Lowest(Low, 39)[1] Stop;
f MarketPosition = 1 Then sell next bar on EntryPrice * (1-0.02) Stop;
If MarketPosition = -1 Then buytocover next bar on EntryPrice * (1+0.02) Stop;
如果覺得此篇文章不錯請按