我對使用"成交量"的策略都相當有興趣,今天找到一個叫FI Volume的交易策略,我自己還沒測試,先上傳給讀者參考看看囉。建議多研究語法思考邏輯,會對新開發程式很有幫助。
TS2000i:
inputs:
CutOff( .003 ),
Samples( 22 ) ;
variables:
TP( 0 ),
MF( 0 ),
VolumePlusMinus( 0 ),
FVEsum( 0 ),
FveFactor( 0 ),
FVE( 0 ) ;
TP = (High + Low + Close ) / 3 ;
MF = (Close - (High + Low ) / 2 )+ TP - TP[1] ;
if MF > CutOff * Close then
FveFactor = 1
else if MF < -1 * CutOff * Close then
FveFactor = -1
else
FveFactor = 0 ;
if BarNumber > Samples then
begin
VolumePlusMinus = Volume * FveFactor ;
FVEsum = Summation( VolumePlusMinus, Samples ) ;
FVE = ( FVEsum / (Average( Volume, Samples ) * Samples ) ) * 100 ;
Value1 = LinearRegSlope( FVE , 35 ) ;
Value2 = LinearRegSlope( Close, 35 ) ;
if FVE crosses over -5 and Value1 > 0
and Value2 < 0
then
Buy Next Bar at Market ;
if ( LinearRegSlope( FVE, 25) < 0 ) or
( DateToJulian( Date ) - DateToJulian( EntryDate ) > 50*( 7 / 5 ) )
then
Sell Next bar at Market ;
end ;
0 留言:
張貼留言
如果有私人問題想請教,請透過網站右方『與站長聯絡』之表單,謝謝!