답변완료
추가 설명좀 부탁합니다
안녕하세요
게시글 72335
그래서 질문드립니다
아래 식에서 보면
bl
bx
차이점을 알고 싶습니다
그리고
고점대비 청산에서 매수1 매도1 에서만 작도 되고요
진입해서 수익권의 고점 대비로 수정좀 부탁합니다
if MarketPosition == 1 Then
{
ExitLong("bx5",AtLimit,EntryPrice+PriceScale*완전청산,"",5,1);
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1,"매수1");
ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2,"매수2");
ExitLong("btr",AtStop,Highest(H,BarsSinceEntry)-PriceScale*고점대비);
}
Else
Lcnt = 0;
if MarketPosition == -1 Then
{
ExitShort("sx5",AtLimit,EntryPrice-PriceScale*완전청산,"",5,1);
ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절1,"매도1");
ExitShort("sl2",AtStop,EntryPrice+PriceScale*손절2,"매도2");
ExitShort("str",AtStop,lowest(L,BarsSinceEntry)+PriceScale*고점대비);
}
Else
Hcnt = 0;
2021-05-07
1526
글번호 148820
시스템
답변완료
시스템 이상 검토의뢰
수고 하십니다 !
Input : Period1(1), Period2(5), Period3(30), Period4(60), Period5(120),period6(240), Period7(480), Period8(960),period9(1920);
var : sma1(0),sma2(0),sma3(0),sma4(0),sma5(0),sma6(0),sma7(0),sma8(0),sma9(0);
sma1 = ma(C,period1);
sma2 = ma(C,period2);
sma3 = ma(C,period3);
sma4 = ma(C,period4);
sma5 = ma(C,period5);
sma6 = ma(C,period6);
sma7 = ma(C,period7);
sma8 = ma(C,period8);
sma9 = ma(C,period9);
var : t(0),s(0);
if MarketPosition <= 1 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 < sma5 and sma5 < sma6 and sma6 < sma7 and sma7 < sma8 and sma8 < sma9 Then
{
t = -1;
s = c;
}
if MarketPosition >= -1 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and sma5 > sma6 and sma6 > sma7 and sma7 > sma8 and sma8 > sma9 Then
{
t = 1;
s = c;
}
if t == -1 Then
Buy ("b");
if t == 1 Then
Sell("s");
if MarketPosition == 1 Then
{
sell("bs",AtStop,EntryPrice-PriceScale*10);
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)-PriceScale*10);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*10);
}
위 수식 대로라면 0,1 같은 청산 이 나오면 안되는데 자꾸 나오네요 원인 이 무엇인가 검토하고
수정 좀 꼭 부탁 드립니다
***** 수고 하세요 *****
2021-05-07
1273
글번호 148793
시스템
답변완료
수식수정 문의
1. 상방 진입조건에 60선위에 5가 상방 변곡시 진입인데.
이때 조건을
1) 진입 시점 이전에 60과 240 이 데드이후에 60선이 5파이상이거나(상승변곡이 3번 이상)
2) 60선이 쌍바닥이 나왔을때
- (쌍바닥의 정의는 :
1)이평선이 꺽였을때의 지점의 이평선 가격을 비교
2)저점이 더 낮아진 쌍바닥이더라도 5틱 이내 or 국내선물 기준 0.15pt 이내는 쌍바닥으로 정의합니다)
3)60선이 턴한 지점간의 즉, 쌍바닥간의 봉의 개수는 30개 이상 나야함
이 조건을 추가하고 싶습니다
///////////////////////////////////////////
var : Period1(3),Period2(10),Period3(30),Period4(120),X5(0),X20(0),X60(0),XP(0),X(0),Y(0),Z(0),Q(0),Mav1(0), Mav2(0),Mav3(0),Mav4(0);
Input : Left(3),right(3);
var : B5(0),BP60(0),B20(0),B60(0),S5(0),S20(0),S60(0),SP60(0),Bcnt5(0),Bcnt20(0),Bcnt60(0),BcntP60(0), Scnt5(0), Scnt20(0), Scnt60(0),ScntP60(0),H1(0),H2(0),L1(0),L2(0);
InPUT : 진입시작시간(090000), 매매종료시간(153000);
if Bdate != Bdate[1] Then
{
Condition1 = False;
Condition2 = False;
}
Var26 = ema(Ema(Ema(c,period1),period1),period1); //ma(c,period1); //5선
Var27 = ema(Ema(Ema(c,period2),period2),period2); //20선
Var28 = ema(Ema(Ema(c,period3),period3),period3); //60선
Var29 = ema(Ema(Ema(c,period4),period4),period4); //240선
if CrossUp(Var26,Var27) Then
X5 = 1; //5-20 cross
if CrossDown(Var26,Var27) Then
X5 = -1;
if CrossUp(Var27,Var28) Then
X20 = 1; //20-60 cross
if CrossDown(Var27,Var28) Then
X20 = -1;
if CrossUp(Var28,Var29) Then
X60 = 1; //60-240 cross
if CrossDown(Var28,Var29) Then
X60 = -1;
if CrossUp(Var26,Var28) Then
XP = 1; //5-60 cross
if CrossDown(Var26,Var28) Then
XP = -1;
if Var26 > var26[1] Then
X = 1;
if Var26 < var26[1] Then
X = -1;
if Var27 > var27[1] Then // X5 : 5-20 Cross X : 5선
Y = 1; // X20 : 20-60 Cross Y : 20선
if Var27 < var27[1] Then // X60 : 60-240 cross Z : 60선
Y = -1; // XP : 5-60 cross
if Var28 > var28[1] Then
Z = 1;
if Var28 < var28[1] Then
Z = -1;
if X == 1 and X != X[1] and Bdate == Bdate[1] Then
Condition1 = true;
if X == -1 and X != X[1] and Bdate == Bdate[1] Then
Condition2 = true;
//////////////////////상방기준//////////////////
if XP == 1 and X == 1 and Condition1 == true Then //5-60 정배열 & 5상승
{
if X != X[1] Then //5선이 상승변곡 이면 B = 1
{
BP60 = 1;
} //5선이 상승변곡 & 20선 상승 & 5선 20선위 & 몸통이 5 BC 면 B =2
if BP60 == 1 and Y == 1 and Var26 > Var27 and C > O and (C+O)/2 >= var26 Then
{
BP60 = 2;
}
}
else
BP60 = 0;
if sDate == 20210429 and sTime < 92000 Then
MessageLog("%.2f",BP60);
//////////////////////하방기준//////////////////
if XP == -1 and X == -1 and Condition2 == true Then
{
if X!= X[1] Then
{
SP60 = 1;
}
if SP60 == 1 and Y == -1 and Var26 < Var27 and C < O and (C+O)/2 < var26 Then
{
SP60 = 2;
}
}
else
SP60 = 0;
//////////////////////////상방시그널/////////////////
if sTime >= 진입시작시간 and sTime <= 매매종료시간 and
XP == 1 Then
{
if XP != XP[1] Then
BcntP60 = 0;
if BP60 == 2 and BP60 != BP60[1] Then
{
BcntP60 = BcntP60+1;
if BcntP60 <= 1 Then
Buy("BP60");
}
}
////////////////////////하방 시그널//////////////////
if sTime >= 진입시작시간 and sTime <= 매매종료시간 and
XP == -1 Then
{
if XP != XP[1] Then
ScntP60 = 0;
if SP60 == 2 and SP60 != SP60[1] Then
{
ScntP60 = ScntP60+1;
if ScntP60 <= 1 Then
Sell("SP60");
}
}
if MarketPosition == 1 Then
{
if X5 == 1 and CountIf(X5 == -1,BarsSinceEntry) == 0 and
X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 <= Var27 then
ExitLong("콜청1",AtMarket);
if X5 == -1 and X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 <= Var27 Then
ExitLong("콜정2",AtMarket);
}
if MarketPosition == -1 Then
{
if X5 == -1 and CountIf(X5 == 1,BarsSinceEntry) == 0 and
X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 >= Var27 Then
ExitShort("풋청1",AtMarket);
if X5 == 1 and X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 >= Var27 Then
ExitShort("풋정2",AtMarket);
}
2021-05-07
1186
글번호 148792
시스템