커뮤니티
문의드려요.
2018-12-20 20:52:02
316
글번호 124648
input : P(0.01),시작시간(90000),종료시간(150000),당일수익틱수(10);
var : MM(0),T(0),HH(0),LL(0),Tcond(false),당일수익(0),N1(0),dayPL(0),Xcond(False);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Tcond = true;
Xcond = false;
N1 = NetProfit;
}
if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
당일수익 = PriceScale*당일수익틱수;
dayPL = NetProfit-N1;
if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) or IsExitName("dsp",1)) Then
Xcond = true;
MM = (highest(H,P)+lowest(L,P))/2;
if T == 0 and C > MM Then
T = 1;
if T == 0 and C < MM Then
T = -1;
if T == 1 and CrossDown(C,lowest(L,P)[1]) Then
T = 0;
if T == -1 and CrossUp(C,highest(H,P)[1]) Then
T = 0;
if T == 1 and T[1] != 1 and Xcond == false and Tcond == true Then
buy();
if T == -1 and T[1] != -1 and Xcond == false and Tcond == true Then
sell();
if MarketPosition == 1 Then
ExitLong("dpb",Atlimit,EntryPrice+당일수익-daypl);
if MarketPosition == -1 Then
ExitShort("dsp",Atlimit,EntryPrice-당일수익+daypl);
위수식에 문의드립니다
당일수익을 얻었을경우 더이상 신호가 발생이 안되어야되는데..
계속 신호가 잡힙니다.
수식 수정 부탁드립니다.
- 1. 125247_제목_없음.jpg (0.13 MB)
답변 1
예스스탁 예스스탁 답변
2018-12-21 10:48:26
안녕하세요
예스스탁입니다.
input : P(0.01),시작시간(90000),종료시간(150000),당일수익틱수(10);
var : MM(0),T(0),HH(0),LL(0),Tcond(false),당일수익(0),N1(0),dayPL(0),Xcond(False);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Tcond = true;
Xcond = false;
N1 = NetProfit[1];
}
if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
당일수익 = PriceScale*당일수익틱수;
dayPL = NetProfit-N1;
if TotalTrades > TotalTrades[1] Then
{
if (IsExitName("dbp",1) or IsExitName("dsp",1)) Then
Xcond = true;
if daypl >= 당일수익 Then
Xcond = true;
}
MM = (highest(H,P)+lowest(L,P))/2;
if T == 0 and C > MM Then
T = 1;
if T == 0 and C < MM Then
T = -1;
if T == 1 and CrossDown(C,lowest(L,P)[1]) Then
T = 0;
if T == -1 and CrossUp(C,highest(H,P)[1]) Then
T = 0;
if T == 1 and T[1] != 1 and Xcond == false and Tcond == true Then
buy();
if T == -1 and T[1] != -1 and Xcond == false and Tcond == true Then
sell();
if MarketPosition == 1 Then
ExitLong("dpb",Atlimit,EntryPrice+당일수익-daypl);
if MarketPosition == -1 Then
ExitShort("dsp",Atlimit,EntryPrice-당일수익+daypl);
즐거운 하루되세요
> 곽민수 님이 쓴 글입니다.
> 제목 : 문의드려요.
> input : P(0.01),시작시간(90000),종료시간(150000),당일수익틱수(10);
var : MM(0),T(0),HH(0),LL(0),Tcond(false),당일수익(0),N1(0),dayPL(0),Xcond(False);
if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{
Tcond = true;
Xcond = false;
N1 = NetProfit;
}
if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{
Tcond = false;
if MarketPosition == 1 Then
ExitLong();
if MarketPosition == -1 Then
ExitShort();
}
당일수익 = PriceScale*당일수익틱수;
dayPL = NetProfit-N1;
if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) or IsExitName("dsp",1)) Then
Xcond = true;
MM = (highest(H,P)+lowest(L,P))/2;
if T == 0 and C > MM Then
T = 1;
if T == 0 and C < MM Then
T = -1;
if T == 1 and CrossDown(C,lowest(L,P)[1]) Then
T = 0;
if T == -1 and CrossUp(C,highest(H,P)[1]) Then
T = 0;
if T == 1 and T[1] != 1 and Xcond == false and Tcond == true Then
buy();
if T == -1 and T[1] != -1 and Xcond == false and Tcond == true Then
sell();
if MarketPosition == 1 Then
ExitLong("dpb",Atlimit,EntryPrice+당일수익-daypl);
if MarketPosition == -1 Then
ExitShort("dsp",Atlimit,EntryPrice-당일수익+daypl);
위수식에 문의드립니다
당일수익을 얻었을경우 더이상 신호가 발생이 안되어야되는데..
계속 신호가 잡힙니다.
수식 수정 부탁드립니다.