커뮤니티
문의드립니다.
2014-07-18 10:56:01
173
글번호 76867
37136번 질문에서 문의드린 것 때문에 다시 질문 올립니다.
yesglobal로 해외 종목을 연구해보고 싶은데 국내종목에서 만들어봤던 수식으로는 yesglobal에서 아무 신호가 잡히지 않아 어떤 점을 수정해야하는지 조언좀 부탁드립니다.
1. 해외 종목중에서도 종목마다 다른 수정을 거쳐야하는지 궁금하구요
2. 수정을 해주시면 어떤 점을 왜 수정했는지 설명도 좀 부탁드리겠습니다.
항상 수고 많으십니다. 감사합니다.
var : T1(0),T2(0),T3(0);
var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0);
input : dayentry(4),당일손실(-1.4),loss(100),Profit(100);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
NP = NetProfit;
if date != date[1] Then{
Condition1 = False;
PreNP = NP[1];
}
dayPL = (NP-PreNP)+PositionProfit;
T1=ema(Close,2);
T2=ema(Close,3);
T3=ma(Close,4);
X = min(T1,T2);
W = iff(T3[1]<T3,X,T3);
if Condition1 == false and T1 > W and T1[1] <= W[1] and dayindex > 0 Then
Condition1 = true;
if Condition1 == false and T1 <= W and T1[1] > W[1] and dayindex > 0 Then
Condition1 = true;
if count < dayentry and dayPL > 당일손실 Then{
if T1 > W and dayindex > 0 and Condition1 == true Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{
buy();
}
}
if T1 <= W and dayindex > 0 and Condition1 == true then {
if count == 0 or
(count >= 1 and MarketPosition == 1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{
sell();
}
}
}
SetStopProfittarget(Profit,PointStop);
SetStopLoss(loss,PointStop);
// SetStopEndofday(150000);
if MarketPosition == 1 and T1 <= W Then
ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL));
if MarketPosition == -1 and T1 > W Then
ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL));
if MarketPosition == 1 and T1 <= W Then
ExitLong();
if MarketPosition == -1 and T1 > W Then
ExitShort();
답변 1
예스스탁 예스스탁 답변
2014-07-18 18:16:51
안녕하세요
예스스탁입니다.
일반적으로 국내선물을 대상으로 하는 식에서
당일 진입횟수나 초기화등이 모두 0시를 기준으로 하는 값으로 계산이 됩니다.
해외선물은 사용자분마다 다른데
거래소의 서버초기화시간을 기준으로 하루를 구별을 많이 합니다.
종목마다 다를수 있는데 아래수식에서는 한국시간으로 7시로 지정했습니다.
차트창속성에서 기준시간을 서울/도쿄시간으로 설정하고 적용하시기 바랍니다.
당일손실이나 손절매, 목표수익은 모두 틱수로 지정하게 변경해 드립니다.
해외선물은 종목에 따라 수숫점 6자리까지 가격대가 다양해서
국내와 같이 1,2포인트로 지정하면 신호가 발생하지 않는 종목들이 많습니다.
첨부된 그림은 아래식을 적용한 차트입니다.
Euro_Fx와 Crude Oil에 적용한 그림입니다.
input : dayentry(4),당일손실틱수(50),loss(100),Profit(100);
var : T1(0),T2(0),T3(0);
var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0),Didx(0);
var : 당일손실(0);
당일손실 = -(PriceScale*당일손실틱수);
NP = NetProfit;
if stime == 070000 or (stime > 070000 and stime[1] < 070000) Then{
count = 0;
Condition1 = False;
PreNP = NP[1];
Didx = 0;
}
Didx = Didx+1;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
dayPL = (NP-PreNP)+PositionProfit;
T1=ema(Close,2);
T2=ema(Close,3);
T3=ma(Close,4);
X = min(T1,T2);
W = iff(T3[1]<T3,X,T3);
if Condition1 == false and T1 > W and T1[1] <= W[1] and Didx > 0 Then
Condition1 = true;
if Condition1 == false and T1 <= W and T1[1] > W[1] and Didx > 0 Then
Condition1 = true;
if count < dayentry and dayPL > 당일손실 Then{
if T1 > W and Didx > 0 and Condition1 == true Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{
buy();
}
}
if T1 <= W and Didx > 0 and Condition1 == true then {
if count == 0 or
(count >= 1 and MarketPosition == 1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{
sell();
}
}
}
SetStopProfittarget(Profit*PriceScale,PointStop);
SetStopLoss(loss*PriceScale,PointStop);
// SetStopEndofday(150000);
if MarketPosition == 1 and T1 <= W Then
ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL));
if MarketPosition == -1 and T1 > W Then
ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL));
if MarketPosition == 1 and T1 <= W Then
ExitLong();
if MarketPosition == -1 and T1 > W Then
ExitShort();
즐거운 하루되세요
> 마코 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 37136번 질문에서 문의드린 것 때문에 다시 질문 올립니다.
yesglobal로 해외 종목을 연구해보고 싶은데 국내종목에서 만들어봤던 수식으로는 yesglobal에서 아무 신호가 잡히지 않아 어떤 점을 수정해야하는지 조언좀 부탁드립니다.
1. 해외 종목중에서도 종목마다 다른 수정을 거쳐야하는지 궁금하구요
2. 수정을 해주시면 어떤 점을 왜 수정했는지 설명도 좀 부탁드리겠습니다.
항상 수고 많으십니다. 감사합니다.
var : T1(0),T2(0),T3(0);
var : X(0),W(0),cnt(0),count(0),NP(0),PreNP(0),dayPL(0);
input : dayentry(4),당일손실(-1.4),loss(100),Profit(100);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
NP = NetProfit;
if date != date[1] Then{
Condition1 = False;
PreNP = NP[1];
}
dayPL = (NP-PreNP)+PositionProfit;
T1=ema(Close,2);
T2=ema(Close,3);
T3=ma(Close,4);
X = min(T1,T2);
W = iff(T3[1]<T3,X,T3);
if Condition1 == false and T1 > W and T1[1] <= W[1] and dayindex > 0 Then
Condition1 = true;
if Condition1 == false and T1 <= W and T1[1] > W[1] and dayindex > 0 Then
Condition1 = true;
if count < dayentry and dayPL > 당일손실 Then{
if T1 > W and dayindex > 0 and Condition1 == true Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{
buy();
}
}
if T1 <= W and dayindex > 0 and Condition1 == true then {
if count == 0 or
(count >= 1 and MarketPosition == 1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != -1) Then{
sell();
}
}
}
SetStopProfittarget(Profit,PointStop);
SetStopLoss(loss,PointStop);
// SetStopEndofday(150000);
if MarketPosition == 1 and T1 <= W Then
ExitLong("daybx2",Atstop,EntryPrice+(당일손실-DayPL));
if MarketPosition == -1 and T1 > W Then
ExitShort("daysx2",Atstop,EntryPrice-(당일손실-DayPL));
if MarketPosition == 1 and T1 <= W Then
ExitLong();
if MarketPosition == -1 and T1 > W Then
ExitShort();