커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-03-05 08:17:43
189
글번호 117132
답변완료
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 시뮬레이트 차트에 쓸 수 있는 코드로 변환 부탁드립니다. Indicator: VFI-Price Divergence inputs: Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ), LinearRegPeriod( 120 ) ; variables: oCutOff( 0 ), { calculated volume cutoff } oVC( 0 ), { trimmed volume values } oMF( 0 ), { difference in ‘typical’ price } oVFI( 0 ), { calculated VFI } MySmoothedVFI( 0 ), { smoothed VFI values } MyVolume( 0 ), { volume after BarInterval test } LRS( 0 ), { linear regression slope - price } LRSI( 0 ), { linear regression slope - VFI } KatsanosDivergence( 0 ), LowestVFI( 9999999 ), VFI1( 0 ); { always positive VFI } MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing, MyVolume, oCutOff, oVC, oMF, oVFI ) ; if MySmoothedVFI < LowestVFI then LowestVFI = MySmoothedVFI ; VFI1 = MySmoothedVFI + AbsValue( LowestVFI )+ 10 ; if Currentbar > LinearRegPeriod * 2 then begin if Close[ LinearRegPeriod ] > 0 then LRS = LinearRegSlope( close , LinearRegPeriod ) / close[ LinearRegPeriod ] * 100 ; if VFI1[ LinearRegPeriod ] > 0 then LRSI= LinearRegSlope( VFI1, LinearRegPeriod ) / VFI1[ LinearRegPeriod ] * 100 ; KatsanosDivergence = XAverage( LRSI - LRS, 3 ) * 100 ; Plot1( KatsanosDivergence ) ; end ; Strategy: Katsanos VFI Cross 0 inputs: Coef( .2 ), VCoef( 2.5 ), Period( 5 ), SmoothedPeriod( 7 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MyVFI( 0 ), MyVolume( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ); if MyVFI crosses over 0 then buy next bar at market ; if MyVFI crosses under 0 then sellshort next bar at market ; Strategy: Katsanos VFI Divergence inputs: Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ), LinearRegPeriod( 120 ), TradeThreshold( 100 ) ; variables: oCutOff( 0 ), { calculated volume cutoff } oVC( 0 ), { trimmed volume values } oMF( 0 ), { difference in ‘typical’ price } oVFI( 0 ), { calculated VFI} MySmoothedVFI( 0 ), { smoothed VFI values } MyVolume( 0 ), { volume after BarInterval test } LRS(0), {linear regression slope - normalized price} LRSI(0), {linear regression slope - normalized VFI} KatsanosDivergence( 0 ), LowestVFI( 9999999 ), VFI1( 0 ) ; { always positive VFI } MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing , MyVolume, oCutOff, oVC, oMF, oVFI ) ; if MySmoothedVFI < LowestVFI then LowestVFI = MySmoothedVFI ; VFI1 = MySmoothedVFI + AbsValue( LowestVFI ) + 10 ; if Currentbar > LinearRegPeriod * 2 then begin if Close[ LinearRegPeriod ] > 0 then LRS = LinearRegSlope( Close , LinearRegPeriod ) / Close[ LinearRegPeriod ]*100 ; if VFI1[ LinearRegPeriod ] > 0 then LRSI = LinearRegSlope( VFI1, LinearRegPeriod ) / VFI1[ LinearRegPeriod ]*100 ; KatsanosDivergence = XAverage( LRSI - LRS, 3 ) * 100 ; end ; { enter long } if KatsanosDivergence[ 1 ] > TradeThreshold and KatsanosDivergence[ 1 ] > KatsanosDivergence and LRSI > 0 then Buy next bar at Market ; { exit long } if KatsanosDivergence < 0 and LRSI < 0 then Sell next bar at Market ; Strategy: Katsanos VFI Pattern inputs: VFIEnterL( -2 ), MA( 40 ), LRPeriod( 20 ), LRC( 30 ), UB( .1 ), LB( -.05 ), VFIExitAngle( -40 ), VFIExitL( -2 ), Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MySmoothedVFI( 0 ), MyVolume( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing, MyVolume, oCutOff, oVC, oMF, oVFI ) ; if BarNumber > 2 * Period then begin if MarketPosition = 0 and oVFI > VFIEnterL and LinearRegAngleFC( oVFI, LRPeriod ) > 0 and oVFI > XAverage( oVFI, MA ) and LinearRegSlopeFC( C, LRC ) < UB * LinearRegValue( C , LRC, LRC - 1 ) / 100 and LinearRegSlopeFC( C, LRC ) > LB * LinearRegValue( C, LRC, LRC - 1 ) / 100 then Buy ( “BUY” ) next bar at market ; if LinearRegAngle( oVFI, LRPeriod ) < VFIExitAngle or oVFI < VFIExitL then Sell ( “VFI EXIT” ) next bar at market ; end ; Strategy: Katsanos VFI MA Cross Inputs: Coef( .2 ), VCoef( 2.5 ), Period( 1305 ), SmoothedPeriod( 3 ), LongVFILen( 25 ), ShortVFILen( 11 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MyVFI( 0 ), MyVolume( 0 ), LongMA( 0 ), ShortMA( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ; LongMA = XAverage( MyVFI, LongVFILen ) ; ShortMA = XAverage( MyVFI, ShortVFILen ) ; if ShortMA crosses over LongMA then buy next bar at market ; if LongMA crosses over ShortMA then sell next bar at market ;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-03-06 15:22:54

안녕하세요 예스스탁입니다. 수식 변환이 불가합니다. 수식에 VFISmooth라는 함수가 사용되고 있는데 함수에 대한 정보가 없어 변환이 가능하지 않습니다. 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 시뮬레이트 차트에 쓸 수 있는 코드로 변환 부탁드립니다. Indicator: VFI-Price Divergence inputs: Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ), LinearRegPeriod( 120 ) ; variables: oCutOff( 0 ), { calculated volume cutoff } oVC( 0 ), { trimmed volume values } oMF( 0 ), { difference in ‘typical’ price } oVFI( 0 ), { calculated VFI } MySmoothedVFI( 0 ), { smoothed VFI values } MyVolume( 0 ), { volume after BarInterval test } LRS( 0 ), { linear regression slope - price } LRSI( 0 ), { linear regression slope - VFI } KatsanosDivergence( 0 ), LowestVFI( 9999999 ), VFI1( 0 ); { always positive VFI } MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing, MyVolume, oCutOff, oVC, oMF, oVFI ) ; if MySmoothedVFI < LowestVFI then LowestVFI = MySmoothedVFI ; VFI1 = MySmoothedVFI + AbsValue( LowestVFI )+ 10 ; if Currentbar > LinearRegPeriod * 2 then begin if Close[ LinearRegPeriod ] > 0 then LRS = LinearRegSlope( close , LinearRegPeriod ) / close[ LinearRegPeriod ] * 100 ; if VFI1[ LinearRegPeriod ] > 0 then LRSI= LinearRegSlope( VFI1, LinearRegPeriod ) / VFI1[ LinearRegPeriod ] * 100 ; KatsanosDivergence = XAverage( LRSI - LRS, 3 ) * 100 ; Plot1( KatsanosDivergence ) ; end ; Strategy: Katsanos VFI Cross 0 inputs: Coef( .2 ), VCoef( 2.5 ), Period( 5 ), SmoothedPeriod( 7 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MyVFI( 0 ), MyVolume( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ); if MyVFI crosses over 0 then buy next bar at market ; if MyVFI crosses under 0 then sellshort next bar at market ; Strategy: Katsanos VFI Divergence inputs: Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ), LinearRegPeriod( 120 ), TradeThreshold( 100 ) ; variables: oCutOff( 0 ), { calculated volume cutoff } oVC( 0 ), { trimmed volume values } oMF( 0 ), { difference in ‘typical’ price } oVFI( 0 ), { calculated VFI} MySmoothedVFI( 0 ), { smoothed VFI values } MyVolume( 0 ), { volume after BarInterval test } LRS(0), {linear regression slope - normalized price} LRSI(0), {linear regression slope - normalized VFI} KatsanosDivergence( 0 ), LowestVFI( 9999999 ), VFI1( 0 ) ; { always positive VFI } MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing , MyVolume, oCutOff, oVC, oMF, oVFI ) ; if MySmoothedVFI < LowestVFI then LowestVFI = MySmoothedVFI ; VFI1 = MySmoothedVFI + AbsValue( LowestVFI ) + 10 ; if Currentbar > LinearRegPeriod * 2 then begin if Close[ LinearRegPeriod ] > 0 then LRS = LinearRegSlope( Close , LinearRegPeriod ) / Close[ LinearRegPeriod ]*100 ; if VFI1[ LinearRegPeriod ] > 0 then LRSI = LinearRegSlope( VFI1, LinearRegPeriod ) / VFI1[ LinearRegPeriod ]*100 ; KatsanosDivergence = XAverage( LRSI - LRS, 3 ) * 100 ; end ; { enter long } if KatsanosDivergence[ 1 ] > TradeThreshold and KatsanosDivergence[ 1 ] > KatsanosDivergence and LRSI > 0 then Buy next bar at Market ; { exit long } if KatsanosDivergence < 0 and LRSI < 0 then Sell next bar at Market ; Strategy: Katsanos VFI Pattern inputs: VFIEnterL( -2 ), MA( 40 ), LRPeriod( 20 ), LRC( 30 ), UB( .1 ), LB( -.05 ), VFIExitAngle( -40 ), VFIExitL( -2 ), Coef( .2 ), VCoef( 2.5 ), Period( 130 ), VFISmoothing( 3 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MySmoothedVFI( 0 ), MyVolume( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MySmoothedVFI = VFISmooth( Coef, VCoef, Period, VFISmoothing, MyVolume, oCutOff, oVC, oMF, oVFI ) ; if BarNumber > 2 * Period then begin if MarketPosition = 0 and oVFI > VFIEnterL and LinearRegAngleFC( oVFI, LRPeriod ) > 0 and oVFI > XAverage( oVFI, MA ) and LinearRegSlopeFC( C, LRC ) < UB * LinearRegValue( C , LRC, LRC - 1 ) / 100 and LinearRegSlopeFC( C, LRC ) > LB * LinearRegValue( C, LRC, LRC - 1 ) / 100 then Buy ( “BUY” ) next bar at market ; if LinearRegAngle( oVFI, LRPeriod ) < VFIExitAngle or oVFI < VFIExitL then Sell ( “VFI EXIT” ) next bar at market ; end ; Strategy: Katsanos VFI MA Cross Inputs: Coef( .2 ), VCoef( 2.5 ), Period( 1305 ), SmoothedPeriod( 3 ), LongVFILen( 25 ), ShortVFILen( 11 ) ; variables: oCutOff( 0 ), oVC( 0 ), oMF( 0 ), oVFI( 0 ), MyVFI( 0 ), MyVolume( 0 ), LongMA( 0 ), ShortMA( 0 ) ; MyVolume = iff( BarType < 2, Ticks, Volume ) ; MyVFI = VFISmooth( Coef, VCoef, Period, SmoothedPeriod, MyVolume, oCutOff, oVC, oMF, oVFI ) ; LongMA = XAverage( MyVFI, LongVFILen ) ; ShortMA = XAverage( MyVFI, ShortVFILen ) ; if ShortMA crosses over LongMA then buy next bar at market ; if LongMA crosses over ShortMA then sell next bar at market ;