답변완료
시그널메이커 수식을 예스트레이더로 변환가능할까요?
시그널메이커에서 만든 수식입니다
예스트레이더로 변환 부탁드립니다
매수
param : BuyA_CCILeng(2) // CCI 기간
, BuyA_SignalLeng(5) // 시그날 기간
;
param : BuyB_CCILeng(2) // CCI 기간
, BuyB_SignalLeng(2) // 시그날 기간
, BuyB_CCILine(0) // CCI 기준값
, BuyB_ChoiceType(0) // CCI 또는 Signal 선택
;
param : BuyC_CCILeng(2) // CCI 기간
, BuyC_SignalLeng(3) // 시그날 기간
, BuyC_CCILine(0) // CCI 기준값
, BuyC_ChoiceType(0) // CCI 또는 Signal 선택
;
param : BuyD_sLeng(9) // ADX 기간
;
param : BuyE_sLeng(17) // ADX 기간
;
param : BuyF_sLeng(42) // ADX 기간
;
var : BuyA_V1(0), BuyA_V2(0), BuyA_Result(FALSE);
var : BuyB_V(0), BuyB_V1(0), BuyB_V2(0), BuyB_Result(FALSE);
var : BuyC_V(0), BuyC_V1(0), BuyC_V2(0), BuyC_Result(FALSE);
var : BuyD_Price3(0), BuyD_Result(FALSE);
var : BuyE_Price3(0), BuyE_Result(FALSE);
var : BuyF_Price3(0), BuyF_Result(FALSE);
BuyA_V1 = CCI2(Close, BuyA_CCILeng);
BuyA_V2 = EMA(BuyA_V1, BuyA_SignalLeng);
BuyA_Result = Crosses_Above(BuyA_V1, BuyA_V2);
BuyB_V1 = CCI2(Close, BuyB_CCILeng);
BuyB_V2 = EMA(BuyB_V1, BuyB_SignalLeng);
If BuyB_ChoiceType = 0 Then // CCI 선택
Begin
BuyB_V = BuyB_V1;
End
Else // Signal 선택
Begin
BuyB_V = BuyB_V2;
End;
BuyB_Result = Crosses_Above(BuyB_V, BuyB_CCILine);
BuyC_V1 = CCI2(Close, BuyC_CCILeng);
BuyC_V2 = EMA(BuyC_V1, BuyC_SignalLeng);
If BuyC_ChoiceType = 0 Then // CCI 선택
Begin
BuyC_V = BuyC_V1;
End
Else // Signal 선택
Begin
BuyC_V = BuyC_V2;
End;
BuyC_Result = Crosses_Above(BuyC_V, BuyC_CCILine);
BuyD_Price3 = ADX (BuyD_sLeng);
BuyD_Result = FALSE;
IF BuyD_Price3 > BuyD_Price3[1] And BuyD_Price3[2] > BuyD_Price3[1] Then
BuyD_Result = TRUE;
BuyE_Price3 = ADX (BuyE_sLeng);
BuyE_Result = FALSE;
IF BuyE_Price3 > BuyE_Price3[1] And BuyE_Price3[2] > BuyE_Price3[1] Then
BuyE_Result = TRUE;
BuyF_Price3 = ADX (BuyF_sLeng);
BuyF_Result = FALSE;
IF BuyF_Price3 > BuyF_Price3[1] And BuyF_Price3[2] > BuyF_Price3[1] Then
BuyF_Result = TRUE;
if ( BuyA_Result And (BuyB_Result Or BuyC_Result) And (BuyD_Result Or BuyE_Result Or BuyF_Result) )
Then
Begin
Buy();
End;
param : ExitLongA_CCILeng(2) // CCI 기간
, ExitLongA_SignalLeng(5) // 시그날 기간
, ExitLongA_Trend(1) // 최소 추세 연속 봉 갯수
, ExitLongA_ChoiceType(0) // CCI 또는 Signal 선택
;
var : ExitLongA_V(0), ExitLongA_V1(0), ExitLongA_V2(0), ExitLongA_nVal(0), ExitLongA_SumDay(0), ExitLongA_Result(FALSE);
ExitLongA_V1 = CCI2(Close, ExitLongA_CCILeng);
ExitLongA_V2 = EMA(ExitLongA_V1, ExitLongA_SignalLeng);
If ExitLongA_ChoiceType = 0 Then // CCI 선택
Begin
ExitLongA_V = ExitLongA_V1;
End
Else // Signal 선택
Begin
ExitLongA_V = ExitLongA_V2;
End;
IF ExitLongA_V < ExitLongA_V[1] Then
ExitLongA_nVal = 1
Else
ExitLongA_nVal = (-1);
ExitLongA_SumDay = AccumN(ExitLongA_nVal, ExitLongA_Trend);
ExitLongA_Result = (ExitLongA_SumDay = ExitLongA_Trend);
if ( ExitLongA_Result )
Then
Begin
ExitLong();
End;
SetStopEndOfday(152000);
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyStoplossPoint(1);
SetStopPosition; // 포지션 전체
SetStopLoss( MyStoplossPoint );
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyProfitTargetPoint(3);
SetStopPosition; // 포지션 전체
SetProfitTarget( MyProfitTargetPoint );
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyPointTrailingBefore(.65), MyPercentTrailingAfter(88);
SetStopPosition; // 포지션 전체
SetPercentTrailing(MyPointTrailingBefore, MyPercentTrailingAfter);
매도
param : SellA_CCILeng(3) // CCI 기간
, SellA_SignalLeng(5) // 시그날 기간
, SellA_CCILine(0) // CCI 기준값
, SellA_ChoiceType(0) // CCI 또는 Signal 선택
;
param : SellB_sLeng(2) // ADX 기간
;
param : SellC_sLeng(2) // ADX 기간
;
param : SellD_sLeng(2) // ADX 기간
;
var : SellA_V(0), SellA_V1(0), SellA_V2(0), SellA_Result(FALSE);
var : SellB_Price3(0), SellB_Result(FALSE);
var : SellC_Price3(0), SellC_Result(FALSE);
var : SellD_Price3(0), SellD_Result(FALSE);
SellA_V1 = CCI2(Close, SellA_CCILeng);
SellA_V2 = EMA(SellA_V1, SellA_SignalLeng);
If SellA_ChoiceType = 0 Then // CCI 선택
Begin
SellA_V = SellA_V1;
End
Else // Signal 선택
Begin
SellA_V = SellA_V2;
End;
SellA_Result = Crosses_Below(SellA_V, SellA_CCILine);
SellB_Price3 = ADX (SellB_sLeng);
SellB_Result = FALSE;
IF SellB_Price3 > SellB_Price3[1] And SellB_Price3[2] > SellB_Price3[1] Then
SellB_Result = TRUE;
SellC_Price3 = ADX (SellC_sLeng);
SellC_Result = FALSE;
IF SellC_Price3 > SellC_Price3[1] And SellC_Price3[2] > SellC_Price3[1] Then
SellC_Result = TRUE;
SellD_Price3 = ADX (SellD_sLeng);
SellD_Result = FALSE;
IF SellD_Price3 > SellD_Price3[1] And SellD_Price3[2] > SellD_Price3[1] Then
SellD_Result = TRUE;
if ( SellA_Result And (SellB_Result Or SellC_Result Or SellD_Result) )
Then
Begin
Sell();
End;
//////////////////////////////////////////////////////////////////////////
// 매도청산
param : ExitShortA_CCILeng(2) // CCI 기간
, ExitShortA_SignalLeng(5) // 시그날 기간
, ExitShortA_Trend(2) // 최소 추세 연속 봉 갯수
, ExitShortA_ChoiceType(0) // CCI 또는 Signal 선택
;
var : ExitShortA_V(0), ExitShortA_V1(0), ExitShortA_V2(0), ExitShortA_nVal(0), ExitShortA_SumDay(0), ExitShortA_Result(FALSE);
ExitShortA_V1 = CCI2(Close, ExitShortA_CCILeng);
ExitShortA_V2 = EMA(ExitShortA_V1, ExitShortA_SignalLeng);
If ExitShortA_ChoiceType = 0 Then // CCI 선택
Begin
ExitShortA_V = ExitShortA_V1;
End
Else // Signal 선택
Begin
ExitShortA_V = ExitShortA_V2;
End;
IF ExitShortA_V > ExitShortA_V[1] Then
ExitShortA_nVal = 1
Else
ExitShortA_nVal = (-1);
ExitShortA_SumDay = AccumN(ExitShortA_nVal, ExitShortA_Trend);
ExitShortA_Result = (ExitShortA_SumDay = ExitShortA_Trend);
if ( ExitShortA_Result )
Then
Begin
ExitShort();
End;
SetStopEndOfday(152000);
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyStoplossPoint(1);
SetStopPosition; // 포지션 전체
SetStopLoss( MyStoplossPoint );
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyProfitTargetPoint(3);
SetStopPosition; // 포지션 전체
SetProfitTarget( MyProfitTargetPoint );
////////////////////////////////////////////////////////////////////////////////////////
Inputs: MyPointTrailingBefore(.65), MyPercentTrailingAfter(.66);
SetStopPosition; // 포지션 전체
SetPercentTrailing(MyPointTrailingBefore, MyPercentTrailingAfter);
SetStopPosition; // 포지션 전체
SetExitOnClose;
2020-09-15
1664
글번호 142397
시스템
답변완료
키움수식을 예스트레이드수식으로 변환부탁드립니다(종목검색)
MMM= floor(D/100)%100;
YY= if((MMM+1-1) == 1 or (MMM+1-1) == 2, floor(D/10000)-1,floor(D/10000));
MM= if((MMM+1-1) == 1, 13, if((MMM+1-1) ==2, 14, MMM));
DD=D%100;
K=(DD +floor((13*MM+8)/5) + floor(YY/400) + floor(YY/100) + YY)%7+2;
A=if(KK>7,KK-7,KK);
HH=
if( A(1)>A, H,
if(A(2)>A(1), Highest(H,2),
if(A(3)>A(2), Highest(H,3),
if(A(4)>A(3), Highest(H,4),Highest(H,5)))));
고= valuewhen(k,A(1)>A, HH(1));
LL=
if( A(1)>A, L,
if(A(2)>A(1), Lowest(L,2),
if(A(3)>A(2), Lowest(L,3),
if(A(4)>A(3), Lowest(H,4),Lowest(H,5)))));
저= valuewhen(k,A(1)>A, LL(1));
종= valuewhen(k,A(1)>A, C(1));
HL=(고+저+종)/3;
HH=
if(A(1)>A, H,
if(A(2)>A(1), Highest(H,2),
if(A(3)>A(2), Highest(H,3),
if(A(4)>A(3), Highest(H,4),Highest(H,5)))));
LLL=
if(A(1)>A, L,
if(A(2)>A(1), Lowest(H,2),
if(A(3)>A(2), Lowest(H,3),
if(A(4)>A(3), Lowest(H,4),Lowest(H,5)))));
KKK =(HH+LLL+C)/3;
FF =(KKK()+
HL(1)+HL(2)+HL(3)+HL(4)+HL(5)+HL(6)+HL(7)+HL(8)+
HL(9)+HL(10)+HL(11)+HL(12)+HL(13)+HL(14)+HL(15)+HL(16)+
HL(17)+HL(18)+HL(19))/20;
편차합=(
pow(KKK()-FF,2)+
pow(HL(1)-FF,2)+
pow(HL(2)-FF,2)+
pow(HL(3)-FF,2)+
pow(HL(4)-FF,2)+
pow(HL(5)-FF,2)+
pow(HL(6)-FF,2)+
pow(HL(7)-FF,2)+
pow(HL(8)-FF,2)+
pow(HL(9)-FF,2)+
pow(HL(10)-FF,2)+
pow(HL(11)-FF,2)+
pow(HL(12)-FF,2)+
pow(HL(13)-FF,2)+
pow(HL(14)-FF,2)+
pow(HL(15)-FF,2)+
pow(HL(16)-FF,2)+
pow(HL(17)-FF,2)+
pow(HL(18)-FF,2)+
pow(HL(19)-FF,2));
FFF= FF+2*sqrt(편차합/20);
C > FFF
2020-09-15
1139
글번호 142374
종목검색