THE SYSTEM IS BASED ON THE «CONTINUATION FACTOR»

THE SYSTEM IS BASED ON THE "CONTINUATION FACTOR"

Type : Strategy, Name : Trend Cont Factor

inputs:
Length( 35 ) ;
variables:
Change( 0 ),
PlusChange( 0 ),
MinusChange( 0 ),
PlusCF( 0 ),
MinusCF( 0 ),
PlusTCF( 0 ),
MinusTCF( 0 ) ;
Change = Close — Close[1] ;
PlusChange = iff( Change > 0, Change, 0 ) ;
MinusChange = iff( Change < 0, -Change, 0 ) ;
PlusCF = iff( PlusChange = 0, 0, PlusChange + PlusCF[1] ) ;
MinusCF = iff( MinusChange = 0, 0, MinusChange + MinusCF[1] ) ;
PlusTCF = Summation( PlusChange — MinusCF, Length ) ;
MinusTCF = Summation( MinusChange — PlusCF, Length ) ;
if PlusTCF > 0 then
Buy next bar at market
else if MinusTCF > 0 then
Sell next bar at market ;

THE SYSTEM IS BASED ON THE "CONTINUATION FACTOR"

Подписаться
Уведомить о
0 комментариев
Межтекстовые Отзывы
Посмотреть все комментарии