커뮤니티

함수변경요청(SK증권)

프로필 이미지
통큰베팅
2015-10-22 20:59:32
130
글번호 91589
답변완료
안녕하세요? 아래 4개의전략은 SK증권에서 사용했던 함수입니다. YT에서 사용할 수 있도록 1개의 함수로 합성하여 변경 요청드립니다. 1. [상대강도(RSI)매수] Params : pPVal( Close ), pLeng( 14 ), pLine( 5 ) ; v1 = RSI( pPVal, pLeng ) ; if CB > 1 then if CrossUp(v1, pLine) Then Buy ("RSI Stg BY", AtMarket); 2. [모멘텀 매도] Params : pPVal( Close ), pLeng( 5 ) ; v0 = Momentum( pPVal, pLeng ) ; v1 = Momentum( v0, 1 ) ; if v0 < 0 and v1 < 0 then Sell ("Momentum SE", AtStop, L + 1 ) ; 3. [채널추적 매도청산] Params : pLeng( 3 ), pFloorAmt( 1 ), pPositionBasis( false ) ; v0 = HighestFast( High, pLeng ) ; If pPositionBasis = false then v1 = CurrentShares * pFloorAmt else v1 = pFloorAmt ; Cond1 = SignalPosition = -1 && MaxPositionProfit >= v1 ; if Cond1 then ExitShort ( "TrailingChannel SX", AtStop, v0 ) ; 4. [채널추적 매수청산] Params : pLeng( 3 ), pProfit( 0.5 ), pIsPosition( false ) ; v0 = LowestFast( Low, pLeng ) ; If pIsPosition = false then v1 = CurrentShares * pProfit else v1 = pProfit ; Cond5 = SignalPosition = 1 && MaxPositionProfit >= v1 ; If Cond5 then ExitLong ( "TrailingChannel LX", AtStop, v0) ;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-10-23 14:02:35

안녕하세요 예스스탁입니다. 1. 수식에 CB라는 변수가 사용되었는내 수식자체에는 해당내용이 없습니다. 아래식에 CB에 대한 계산식 추가하셔야 합니다. input : pLeng( 14 ), pLine( 5 ) ; var : V1(0),CB(0); v1 = RSI(pLeng ) ; CB : ~~~~; if CB > 1 and CrossUp(v1, pLine) Then Buy ("RSI Stg BY", AtMarket); 2. input : pLeng( 5 ) ; var : V0(0),V1(0); v0 = Momentum(pLeng ) ; v1 = V0 / V0[1] * 100; if v0 < 0 and v1 < 0 then Sell ("Momentum SE", AtStop, L + 1 ) ; 3. input : pLeng( 3 ), pFloorAmt( 1 ), pPositionBasis( false ) ; var : V0(0),V1(0),Cond1(false); v0 = Highest(High, pLeng ) ; If pPositionBasis == false then v1 = CurrentContracts * pFloorAmt; else v1 = pFloorAmt ; Cond1 = MarketPosition == -1 && MaxPositionProfit >= v1 ; if Cond1 then ExitShort ( "TrailingChannel SX", AtStop, v0 ) ; 4. input : pLeng( 3 ), pProfit( 0.5 ), pIsPosition( false ) ; var : V0(0),V1(0),Cond5(false); v0 = Lowest( Low, pLeng ) ; If pIsPosition == false then v1 = CurrentContracts * pProfit; else v1 = pProfit ; Cond5 = MarketPosition == 1 && MaxPositionProfit >= v1 ; If Cond5 then ExitLong ( "TrailingChannel LX", AtStop, v0) ; 즐거운 하루되세요 > 통큰베팅 님이 쓴 글입니다. > 제목 : 함수변경요청(SK증권) > 안녕하세요? 아래 4개의전략은 SK증권에서 사용했던 함수입니다. YT에서 사용할 수 있도록 1개의 함수로 합성하여 변경 요청드립니다. 1. [상대강도(RSI)매수] Params : pPVal( Close ), pLeng( 14 ), pLine( 5 ) ; v1 = RSI( pPVal, pLeng ) ; if CB > 1 then if CrossUp(v1, pLine) Then Buy ("RSI Stg BY", AtMarket); 2. [모멘텀 매도] Params : pPVal( Close ), pLeng( 5 ) ; v0 = Momentum( pPVal, pLeng ) ; v1 = Momentum( v0, 1 ) ; if v0 < 0 and v1 < 0 then Sell ("Momentum SE", AtStop, L + 1 ) ; 3. [채널추적 매도청산] Params : pLeng( 3 ), pFloorAmt( 1 ), pPositionBasis( false ) ; v0 = HighestFast( High, pLeng ) ; If pPositionBasis = false then v1 = CurrentShares * pFloorAmt else v1 = pFloorAmt ; Cond1 = SignalPosition = -1 && MaxPositionProfit >= v1 ; if Cond1 then ExitShort ( "TrailingChannel SX", AtStop, v0 ) ; 4. [채널추적 매수청산] Params : pLeng( 3 ), pProfit( 0.5 ), pIsPosition( false ) ; v0 = LowestFast( Low, pLeng ) ; If pIsPosition = false then v1 = CurrentShares * pProfit else v1 = pProfit ; Cond5 = SignalPosition = 1 && MaxPositionProfit >= v1 ; If Cond5 then ExitLong ( "TrailingChannel LX", AtStop, v0) ;