커뮤니티
함수변경요청(SK증권)
2015-10-23 15:59:58
136
글번호 91632
안녕하세요?
아래는 SK증권에서 사용했던 함수입니다.
CB의 의미는 CurrentBar입니다.
즉, 현재 봉의 유효한 봉번호입니다.
최소필요봉수가 50이라면 51번째 봉의 CB가 1값입니다.
YT로 변환 요청드립니다.
Params : pPVal_1( Close ), pLeng_1( 14 ), pLine_1( 5 ) ;
v11 = RSI( pPVal_1, pLeng_1 ) ;
if CB > 1 then
if CrossUp(v11, pLine_1) Then
Buy ("RSI Stg BY", AtMarket);
Params : pPVal_2( Close ), pLeng_2( 5 ) ;
v0 = Momentum( pPVal_2, pLeng_2 ) ;
v1 = Momentum( v0, 1 ) ;
if v0 < 0 and v1 < 0 then
Sell ("Momentum SE", AtStop, L + 1 ) ;
Params : pLeng_3( 3 ), pFloorAmt_3( 1 ), pPositionBasis_3( false ) ;
v2 = HighestFast( High, pLeng_3 ) ;
If pPositionBasis_3 = false then
v3 = CurrentShares * pFloorAmt_3
else
v3 = pFloorAmt_3 ;
Cond1 = SignalPosition = -1 && MaxPositionProfit >= v3 ;
if Cond1 then
ExitShort ( "TrailingChannel SX", AtStop, v2 ) ;
Params : pLeng_4( 3 ), pProfit_4( 0.5 ), pIsPosition_4( false ) ;
v4 = LowestFast( Low, pLeng_4 ) ;
If pIsPosition_4 = false then
v5 = CurrentShares * pProfit_4
else
v5 = pProfit_4 ;
Cond5 = SignalPosition = 1 && MaxPositionProfit >= v5 ;
If Cond5 then
ExitLong ( "TrailingChannel LX", AtStop, v4) ;
답변 1
예스스탁 예스스탁 답변
2015-10-23 18:02:52
안녕하세요
예스스탁입니다.
input : pLeng_1( 14 ), pLine_1( 5 ) ;
var : v11(0);
v11 = RSI( pLeng_1 ) ;
if CurrentBar > 1 then
if CrossUp(v11, pLine_1) Then
Buy ("RSI Stg BY", AtMarket);
input : pLeng_2( 5 ) ;
var : V0(0),V1(0);
v0 = Momentum(pLeng_2 ) ;
v1 = v0/V0[1]*100;
if v0 < 0 and v1 < 0 then
Sell ("Momentum SE", AtStop, L + 1 ) ;
input : pLeng_3( 3 ), pFloorAmt_3( 1 ), pPositionBasis_3( false ) ;
var : v2(0),v3(0),Cond1(false);
v2 = Highest( High, pLeng_3 ) ;
If pPositionBasis_3 == false then
v3 = CurrentContracts * pFloorAmt_3;
else
v3 = pFloorAmt_3 ;
Cond1 = MarketPosition == -1 && MaxPositionProfit >= v3 ;
if Cond1 then
ExitShort ( "TrailingChannel SX", AtStop, v2 ) ;
input : pLeng_4( 3 ), pProfit_4( 0.5 ), pIsPosition_4( false ) ;
var :v4(0),v5(0),cond5(false);
v4 = Lowest( Low, pLeng_4 ) ;
If pIsPosition_4 == false then
v5 = CurrentContracts * pProfit_4;
else
v5 = pProfit_4 ;
Cond5 = MarketPosition == 1 && MaxPositionProfit >= v5 ;
If Cond5 then
ExitLong ( "TrailingChannel LX", AtStop, v4) ;
즐거운 하루되세요
> 통큰베팅 님이 쓴 글입니다.
> 제목 : 함수변경요청(SK증권)
> 안녕하세요?
아래는 SK증권에서 사용했던 함수입니다.
CB의 의미는 CurrentBar입니다.
즉, 현재 봉의 유효한 봉번호입니다.
최소필요봉수가 50이라면 51번째 봉의 CB가 1값입니다.
YT로 변환 요청드립니다.
Params : pPVal_1( Close ), pLeng_1( 14 ), pLine_1( 5 ) ;
v11 = RSI( pPVal_1, pLeng_1 ) ;
if CB > 1 then
if CrossUp(v11, pLine_1) Then
Buy ("RSI Stg BY", AtMarket);
Params : pPVal_2( Close ), pLeng_2( 5 ) ;
v0 = Momentum( pPVal_2, pLeng_2 ) ;
v1 = Momentum( v0, 1 ) ;
if v0 < 0 and v1 < 0 then
Sell ("Momentum SE", AtStop, L + 1 ) ;
Params : pLeng_3( 3 ), pFloorAmt_3( 1 ), pPositionBasis_3( false ) ;
v2 = HighestFast( High, pLeng_3 ) ;
If pPositionBasis_3 = false then
v3 = CurrentShares * pFloorAmt_3
else
v3 = pFloorAmt_3 ;
Cond1 = SignalPosition = -1 && MaxPositionProfit >= v3 ;
if Cond1 then
ExitShort ( "TrailingChannel SX", AtStop, v2 ) ;
Params : pLeng_4( 3 ), pProfit_4( 0.5 ), pIsPosition_4( false ) ;
v4 = LowestFast( Low, pLeng_4 ) ;
If pIsPosition_4 = false then
v5 = CurrentShares * pProfit_4
else
v5 = pProfit_4 ;
Cond5 = SignalPosition = 1 && MaxPositionProfit >= v5 ;
If Cond5 then
ExitLong ( "TrailingChannel LX", AtStop, v4) ;
다음글
이전글