답변완료
문의드립니다.
안녕하세요.
아래 기존의 검색식에 일부 추가를 하고 싶습니다.
var1 = (highest(H,5)+lowest(L,5))/2;
var2 = (highest(H,10)+lowest(L,10))/2;
var3 = (highest(H,20)+lowest(L,20))/2;
if C >= 5000 and C <= 30000 And
countif(C > O and H >= O*1.05,30) >= 1 and H < O*1.05 and
ma(v,5)[1] >= 100000 and
C >= var1 and C >= var2 and C >= var3 Then
find(1);
1. var1 >= var2 >= var3
2. 주가가 var1에 5% 이내 접근. 이 접근이 일봉상 7봉이내에서 1번째, 2번
째, 3번째 접근인 경우만 한정.
var1 = (highest(H,5)+lowest(L,5))/2;
var2 = (highest(H,10)+lowest(L,10))/2;
var3 = (highest(H,20)+lowest(L,20))/2;
if C >= 5000 and C <= 30000 And
countif(C > O and H >= O*1.05,30) >= 1 and H < O*1.05 and
countif(c >= var1 and C <= var1*1.05,7) <= 3;
ma(v,5)[1] >= 100000 and
C >= var1 and C >= var2 and C >= var3 AND
var1 >= var2 >= var3 Then
find(1);
위 조건을 추가하여 만들었는데 검증에서 맞지 않다고 하네요.
수정 부탁드립니다.
감사합니다.
2019-11-08
262
글번호 133534
검색
답변완료
키움증권에서 쓰던 수식을 예스스탁에서 사용가능한가요?(변경원합니다.)
키움증권에서 쓰던 수식입니다.
혹시 예스스탁에서 사용할수 있게 변경 가능한가요?
총 6개 수식입니다.
1.빨주노초(기술적지표)
수식1
CL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-CL)/5)*1)
수식2
CL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-CL)/5)*2)
수식3
CL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-CL)/5)*3)
수식4
CL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
highest(H, period)-(((highest(H, period)-CL)/5)*4)
수식5
highest(h,period)
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
2.최저점(기술적지표)
수식1
CL=valuewhen(1,(highest(h(1),period)<highest(h,period)),((highest(high,Period)+lowest(low,Period))/2));
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
3.300억 거래대금(신호검색)
A = (H + L+ O + C) / 4 * V / 100000000;
B = Sum(A);
D = ValueWhen(1, Date(1) != Date, B(1));
E = B - D;
CrossUp(E, 300)
highest(H, period)-(((highest(H, period)-CL)/5)*10)
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
4.거래량(기술적지표)
수식1
highest(V,period)
수식2
highest(V,period)/2
수식3
highest(V,period)/4
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
5.a.300억 거래대금(신호검색)
거래량 * ((고가+저가)/2) > 35000000000
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
6.가격이평선
수식1
MA(가격, 기간1, 이평종류)
수식2
MA(가격, 기간2, 이평종류)
수식3
MA(가격, 기간3, 이평종류)
2019-11-08
1863
글번호 133533
사용자 함수
답변완료
부탁드립니다.
매번 감사드립니다.
아래식에서
1) B1■, B2■, S1■, S2■ 신호의 색깔을 PINK로 해주시고,
2) 숫자+★ 에서 "★"만 Yellow로 표현 부탁드립니다.
감사합니다.
Input: AA(-120), BB(-40);
Input : 손절(10),익절(10),익절하락(1);
input : P1(30), P2(120), p3(240);
input : StartTime(090000),EndTime(050000);
var : tx(0),X(false),Tcond(false),tt(0);
var1 = ma(C, P1);
var2 = ma(C, P2);
var3 = ma(C, P3);
######## 진입제한
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime)Then
{
Tcond = true;
}
if (sdate != sdate[1] and stime >= Endtime) or
(sdate == sdate[1] and stime >= Endtime and stime[1] < Endtime)Then
{
Tcond = false;
}
## 진입
if Tcond == true and marketposition == 0
and crossup(var1,var2) Then
{
if Condition1 == true and tt < BB then ###
buy("B1■"); ###
Else
buy("B1"); ###
}
if Tcond == true and marketposition == 0
and crossdown(var1,var2) Then
{
if Condition1 == true and tt < BB then
sell("S1■");
Else
sell("S1");
}
if Tcond == true and marketposition == 0
and crossup(var2,var3) and var3[1] < var3 Then
{
if Condition1 == true and tt < BB then
buy("B2■");
Else
buy("B2");
}
if Tcond == true and marketposition == 0
and crossdown(var3,var4) and var3[1] > var3 Then
{
if Condition1 == true and tt < BB then
sell("S2■");
Else
sell("S2");
}
## 청산
if MarketPosition == 1 then
{
SetStopTrailing(익절하락,익절,PointStop);
SetStopLoss(손절,PointStop);
}
if MarketPosition == -1 Then
{
SetStopTrailing(익절하락,익절,PointStop);
SetStopLoss(손절,PointStop);
}
if ((sdate != sdate[1] and stime >= Endtime) or
(sdate == sdate[1] and stime >= Endtime and stime[1] < Endtime)) Then
{
if MarketPosition == 1 Then
{
ExitLong("BE6");
}
if MarketPosition == -1 Then
{
ExitShort("SE6");
}
}
if TotalTrades > TotalTrades[1] then
{
if IsExitName("StopLoss",1) == true then
{
tt = tt - 40;
if tt >= 0 Then
{
tt = 0;
Condition1 = false;
}
if tt > AA then ###
{
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0));
Text_SetSize(tx,20);
Text_Setstyle(tx,2,20);
}
else
{
Condition1 = true;
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0)+"★");
Text_SetSize(tx,20);
Text_Setstyle(tx,2,20);
}
}
if IsExitName("StopTrailing",1) == true then
{
tt = tt + 30;
if tt >= 0 Then
{
tt = 0;
X = true;
Condition1 = false;
}
if Condition1 == true and tt >= BB then ###
Condition1 = false; ###
if tt > AA then ###
{
tx = Text_New(ExitDate(1),ExitTime(1),h[BarsSinceExit(1)],NumToStr(tt,0));
Text_SetSize(tx,20);
Text_Setstyle(tx,2,2);
}
}
}
2019-11-10
261
글번호 133532
시스템
답변완료
피라미딩 max 조절
별첨파일은 아래수식을 시뮬레이션한 결과입니다.
피라미딩은 max 6개되는 수식입니다.
2017년5월29일을 보면
buy 진입 후 피라미딩을 3개까지(잔고 4개) 하다가
9시05분 2번째,3번째,4번째가 손절로 청산된 후(잔고1개)
9시22분 다시 피라미딩을 하여 max6개를 채웁니다.
요청사항
1) 피라미딩 max n개의 50% 이상 손절될 경우는 피라미딩 중지
위 경우처럼 3개 손절되면 피라미딩 중지. 잔고1개로 포지션 유지.
2) 피라미딩 max에서 손절되는 갯수를 제한 나머지 숫자가 피라미딩 max가 됨
위 경우처럼 3개 손절되면 max 피라미딩은 3개까지 허용.
두 가지 경우를 나누어 요청드립니다.
*************************************************************
input : up진입수(1), dn진입수(1);
input : uppyra검증(0.20);
input : 상승pyra(0.00),상승N(6);
input : dnpyra검증(0.20);
input : 하락pyra(0.00),하락N(6);
input : up강제손절(0.60),dn강제손절(0.60);
var : S1(0),S2(0),ST(0),E1(0),E2(0),ET(0),second(0);
var : T1(0),entry(0);
if bdate != Bdate[1] Then
T1 = TotalTrades;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = TotalTrades-T1+1;
S1 = TimeToMinutes(stime)*60;
S2 = FracPortion(stime/100)*100;
ST = S1+S2;
E1 = TimeToMinutes(time)*60;
E2 = FracPortion(time/100)*100;
ET = E1+E2;
if sdate == date Then
Second = ET-ST;
Else
Second = 86400-ST+ET;
if entry < up진입수 and second < second[1] and C > O Then
buy("b1");
if entry < dn진입수 and second < second[1] and C < O Then
sell("s1");
if MarketPosition == 1 and C >= EntryPrice+uppyra검증 and MaxContracts < 상승N Then
buy("bb",AtStop,LatestEntryPrice(0)+상승Pyra);
if MarketPosition == -1 and C <= EntryPrice-dnpyra검증 and MaxContracts < 하락N Then
sell("ss",AtStop,LatestEntryPrice(0)-하락Pyra);
if MarketPosition == 1 Then
{
SetStopLoss(up강제손절,pointstop);
}
if MarketPosition == -1 Then
{
SetStopLoss(dn강제손절,pointstop);
}
2019-11-11
276
글번호 133519
시스템