커뮤니티
문의드립니다.
2014-07-15 14:49:35
184
글번호 76741
국내 장에서는 시스템이 제대로 작동되는데 해외 장에서는 시스템이 작동되지 않네요
무슨 문제일까요??
항상 감사합니다.
var : T1(0),T2(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;
X = min(T1,T2);
W = iff(T5[1]<T5,X,T5);
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-16 10:49:16
안녕하세요
예스스타입니다.
해당식 적용해 보았지만 첨부된 그림과 같이 신호가 정상적으로 발생합니다.
T1,T2,T5는 어떤 값인지 알수 없어 이평으로 대체했습니다.
T1 = ma(C,5);
T2 = ma(C,20);
T5 = ma(c,60);
신호가 발생하지 않는다면 T1,T2,T5 계산식을 살펴보셔야 합니다.
해외선물은 매수잔량이나 매도잔량등이 제공되지 않습니다.
해당 값 지표로 출력해서 값이 출력되는지 확인하시기 바랍니다
즐거운 하루되세요
> 마코 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 국내 장에서는 시스템이 제대로 작동되는데 해외 장에서는 시스템이 작동되지 않네요
무슨 문제일까요??
항상 감사합니다.
var : T1(0),T2(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;
X = min(T1,T2);
W = iff(T5[1]<T5,X,T5);
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();
다음글
이전글