답변완료
수식수정
input : StartTime(080000),EndTime(55000),Xtime(55500);
var : Tcond(false),B1(0),B2(0),X1(0),X2(0),entry(0);
if sdate != sDate[1] Then
SetStopEndofday(Xtime);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
SetStopEndofday(0);
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
B1 = DayLow(1)+(DayHigh(1)-DayLow(1))*-0.246;
B2 = DayLow(1)+(DayHigh(1)-DayLow(1))*-0.382;
X1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.400;
X2 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.950;
if Tcond == true and
DayOpen > DayLow(1)+(DayHigh(1)-DayLow(1))*0.618 and
DayOpen <= DayLow(1)+(DayHigh(1)-DayLow(1))*0.982 Then
if Tcond == true Then
{
if (MarketPosition == 0 or (MarketPosition == 1 and MaxEntries == 1)) Then
{
if entry < 5 and L > B1 Then
Buy("b1",AtLimit,B1);
if entry < 5 and L > B2 Then
Buy("b2",AtLimit,B2);
}
if MarketPosition == 1 Then
{
ExitLong("bx1",AtLimit,X1);
ExitLong("bx2",AtLimit,X2);
}
}
SetStopProfittarget(PriceScale*300,PointStop);
SetStopLoss(PriceScale*20,PointStop);
--------------------------
그래프는 전일대비 피보나치 수열이 -261.80% 매수후 -100% 청산 입니다.
위 수식어에서 피보나치수열의 %를 수정을 부탁드립니다
2021-08-18
1065
글번호 151579
시스템
답변완료
안녕하세요 질문드립니다.
아래 4개는 제가 시뮬레이션해보는 청산식입니다.
1. 45프로 이득후 청산 또는
2. 35상승후 10프로 하락시 청산 또는
3. 6프로 하락시 청산 또는
4. 2000봉 경과시 청산
이것을 아래식으로 써주셨는데요
Var : ZPrice(0),Zhigh(0);
Var : Bidx1(0);
if MArketPosition == 1 Then
{
if CurrentContrActs > CurrentContrActs[1] And LAtestEntryNAme(0) == "Z" Then
{
ZPrice = LAtestEntryPrice(0);
Zhigh = H;
}
if Zhigh > 0 And H > Zhigh Then
Zhigh = H;
if ZPrice > 0 Then
{
ExitLong("Z1",AtLimit,ZPrice*1.45,"Z");
if Zhigh >= ZPrice*1.35 Then
ExitLong("Z2",AtStop,Zhigh*0.90,"Z");
ExitLong("Z3",AtStop,ZPrice*0.94,"Z");
}
if ZPrice > 0 Then
{
Bidx1 = Bidx1+1;
if Bidx1 == 2000 Then
ExitLong("Z4",OnClose,DEf,"Z");
}
}
Else
{
ZPrice = 0;
Zhigh = 0;
Bidx1 = 0;
}
여기서 2번 청산조건인 35상승후 10프로 하락시 청산 식을 빼고
1. 45프로 이득후 청산 또는
3. 6프로 하락시 청산 또는
4. 2000봉 경과시 청산
이렇게 3개의 조건만 사용하고싶습니다.
위의 식좀 수정부탁드립니다.
2021-08-18
922
글번호 151578
시스템
답변완료
변경 부탁 드립니다
키움 수식입니다 시스템트레이딩 수식으로 변경 부탁 드립니다.
S=sum(1);
N5=ma(c, 기간1, 지수 );
상전이5=N5>N5(1) && N5(1)<N5(2);
N2=ma(c, 기간2);
DC=valuewhen(1, crossdown(N5,N2),S);
상변화1=valuewhen(1, 상전이5, S);
상변화2=valuewhen(2, 상전이5, S);
상변화3=valuewhen(3, 상전이5, S);
GC=valuewhen(1, crossup(N5, N2), S);
조건W=상변화3<DC && DC<상변화2 && 상변화2<상변화1 && 상변화1<GC;
Period = 20
D1 =2
기간1 = 3
기간2 = 10
2021-08-17
1306
글번호 151573
시스템
답변완료
키움 수식입니다. 수식 변경 부탁 드립니다.
키움 수식입니다.
시스템트레이딩 수식으로 변경 부탁 드립니다.
period = 30봉
1차매수
A=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-A)/5)*5)
2차매수
A=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-A)/5)*6)
3차매수
A=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-A)/5)*7)
.
차트용 수식으로 변경 부탁 드립니다.
A=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-A)/5)*5)
2021-08-17
1499
글번호 151567
시스템