커뮤니티
문의드립니다.
2014-02-17 17:58:45
139
글번호 72643
다름이 아니라, 포지션 진입이 시초가에 수식의 조건이 만족하면 시초가 첫 캔들 종가에 바로 진입을 하는 날이 있는가 하면, 첫번째 변곡때(예를들면 시초가에 매수조건가 만족하고있다면 매도부터, 매도조건이 만족하고있다면 매수부터) 진입을 하기도 해서 어떤 문제점이 있는지 잘 모르겠어서 질문올립니다.
시초가에 매수조건이 만족하더라도 매수가 들어가지 않고 매도조건이 만족할때 매도로,
시초가에 매도조건이 만족하더라도 매도가 들어가지 않고 매수조건이 만족할때 매수로
진입하도록 수식 정정 부탁드립니다.
감사합니다.
input : dayentry(8),loss(0.4),Profit(0.6),당일손실(-2);
var : X(0),W(0),cnt(0),count(0),T1(0),T2(0),T3(0),T4(0),NP(0),PreNP(0),dayPL(0);
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;
input : N(0);
if date != date[1] Then
Condition1 = False;
X=MIN(T1, T2, T3, T4);
if T5[1]<T5 Then{
Condition1 = true;
W = X;
}
Else
W = T5;
if count < dayentry and Condition1 == true and dayPL > 당일손실 Then{
if T1 > W and count < N 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 count < N 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-02-18 11:09:55
안녕하세요
예스스탁입니다.
현재 수식이 T5값이 한번이라도 상승이 발생한 이후에 신호가 발생하게 되어 있어
첫봉에 나올수도 있고 두번째 봉 이후에 나올수도 있습니다.
또한 진입조건이 T1이 W보다 크면 매수 작거나 같으면 매도로
단순 현재봉의 높낮이만 판단하게 되어 있습니다.
진입조건을 크로스하는 식으로 변경하시면 됩니다.
input : dayentry(8),loss(0.4),Profit(0.6),당일손실(-2);
var : X(0),W(0),cnt(0),count(0),T1(0),T2(0),T3(0),T4(0),NP(0),PreNP(0),dayPL(0);
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;
input : N(0);
if date != date[1] Then
Condition1 = False;
X=MIN(T1, T2, T3, T4);
if T5[1]<T5 Then{
Condition1 = true;
W = X;
}
Else
W = T5;
if count < dayentry and Condition1 == true and dayPL > 당일손실 Then{
if crossup(T1, W) and count < N Then{
if count == 0 or
(count >= 1 and MarketPosition == -1) Or
(Count >= 1 and MarketPosition == 0 and MarketPosition(1) != 1) Then{
buy();
}
}
if CrossDown(T1,W) and count < N 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();
즐거운 하루되세요
> 마코 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 다름이 아니라, 포지션 진입이 시초가에 수식의 조건이 만족하면 시초가 첫 캔들 종가에 바로 진입을 하는 날이 있는가 하면, 첫번째 변곡때(예를들면 시초가에 매수조건가 만족하고있다면 매도부터, 매도조건이 만족하고있다면 매수부터) 진입을 하기도 해서 어떤 문제점이 있는지 잘 모르겠어서 질문올립니다.
시초가에 매수조건이 만족하더라도 매수가 들어가지 않고 매도조건이 만족할때 매도로,
시초가에 매도조건이 만족하더라도 매도가 들어가지 않고 매수조건이 만족할때 매수로
진입하도록 수식 정정 부탁드립니다.
감사합니다.
input : dayentry(8),loss(0.4),Profit(0.6),당일손실(-2);
var : X(0),W(0),cnt(0),count(0),T1(0),T2(0),T3(0),T4(0),NP(0),PreNP(0),dayPL(0);
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;
input : N(0);
if date != date[1] Then
Condition1 = False;
X=MIN(T1, T2, T3, T4);
if T5[1]<T5 Then{
Condition1 = true;
W = X;
}
Else
W = T5;
if count < dayentry and Condition1 == true and dayPL > 당일손실 Then{
if T1 > W and count < N 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 count < N 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();
다음글
이전글