답변완료
문의
1. 해석 부탁하고요
stdv = std(C,P);
2. x는 포인트인가요?
stdv*x
***************************************************************************
안녕하세요
예스스탁입니다.
input : P(20),X(2);
var : stdv(0);
stdv = std(C,P);
if MarketPosition == 1 Then
ExitLong("bx",AtStop,EntryPrice-stdv*x);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,EntryPrice+stdv*x);
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 표준편차를 이용한
손절 수식 예를 부탁드립니다.
2021-06-29
1241
글번호 150389
시스템
답변완료
추가 요청3
안녕하세요?
문의에 매번 답변 주심에 항상 감사드립니다.
아래 로직에서 진입후 만약 수익이 났다가 익절 되지 않고
다시 되돌림이 와서 진입가에 도달하면 본절하는 조건을 추가할수 있는지요?
---------------
input : P1(5),P2(20);
input : sto1(10),sto2(5),sto3(5);
var : stok(0),stod(0);
var : mav1(0),mav2(0),T(0);
stok = stochasticsK(sto1,sto2);
stod = stochasticsD(sto1,sto2,sto3);
mav1 = ma(C,P1);
mav2 = ma(C,P2);
if CrossUp(mav1,mav2) Then
T = 1;
if CrossDown(mav1,mav2) Then
T = -1;
if T == 1 and CrossUp(stok,stod) Then
{
T = 2;
Buy("b");
}
if T == -1 and CrossDown(stok,stod) Then
{
T = -2;
Sell("s");
}
SetStopProfittarget(1.3,PointStop);
SetStopLoss(0.8,PointStop);
var : month(0),nday(0),week(0);
month = int(date/100)-int(date/10000)*100;
nday = date - int(date/100)*100;
Week = DayOfWeek(date);
if (month%3 == 0 and nday >= 8 and nday <= 14 and week == 4) then
SetStopEndofday(151500);
Else
SetStopEndofday(153000);
2021-06-29
1242
글번호 150380
시스템
답변완료
문의드립니다.
안녕하세요, 노고에 항상 감사드립니다.
현재 사용중인 일봉 거래 시스템에 다음 분봉 상 고점 돌파 로직을 추가 적용해보고자
다음 내용을 수식화 했습니다.
1.종가(day2)가 전일(day1) 종가 대비 10프로 이상 상승하고 10시이전 고점을 당일(day2) 2시30분 이후에 돌파
2. 익일(day3) 종가가 10%이상 상승
3. 익익일(day4) 주가가 직전일(day3) 종가 대비 5% 하락 시 매수
If C >= O*1.1 then
{
high1 = true;
if timehigh(90000,95959) < timehigh(143000, 153000) then
{
high2 = true;
}
else
{
High2 = false;
}
High_index = index;
}
If high1 == true and high_index >0 and index == high_index + 1 and h >= C[1] *1.1 then
{
if high2 == true then
S_pick = true;
Else
S_pick = false;
}
Else
{
High1 = false;
High2 = false;
High_index = 0;
S_pick = false;
}
If high1 == true and S_pick == true and index == high_index+2 then
Buy("b1", atlimit, c[1]*0.95);
문의 드리고자 하는 내용은 다음과 같습니다.
1. timehigh를 일봉거래 시에 사용할 수 있나요?
2. timehigh를 당일 장 중이 아닌 지나간 일봉에서도 사용가능한가요?(과거 데이터 시뮬레이션용)
3. 불가능하다면 어떻게 활용할 수 있을까요?
(예,분봉 검색식 활용하여 수기로 걸러냄, 분봉 매수/매도식 작성하여 타주기참조, 전체 시스템을 분봉용으로 재작성 등)
4. 분봉 거래만 가능하다면 분봉 수식으로 변환도 부탁드립니다.
감사합니다. 오늘도 즐거운 하루 보내세요.
2021-06-29
1705
글번호 150370
시스템
답변완료
수식 작성 부탁드립니다.
안녕하세요. 전에 알려준 수식을 아래와 같이 응용하여 사용하고 있습니다.
이걸 아래와 같이 변경하고자 할때 수식 좀 작성 부탁드립니다.
1. 매수조건 : 시초가 대비 +0.13%
2. 매도조건 : 시초가 대비 -0.13%
3. 손절조건 : 0.12%
그럼 수고하세요.
***************************************************
input : BPrice1(0.75995);
input : SPrice1(0.75795);
input : pt(0.0019);
if sDate != sDate[1] Then
SetStopEndofday(55500);
if Bdate != Bdate[1] Then
SetStopEndofday(0);
if h < Bprice1 Then
Buy("b1",AtStop,Bprice1);
if L > Sprice1 Then
Sell("s1",AtStop,Sprice1);
SetStopLoss(pt,PointStop);
2021-06-29
1263
글번호 150369
시스템
답변완료
수식종료후 매매시작 수식작성
수고 하십니다 !
Input : Period1(1), Period2(10), Period3(35), Period4(60), Period5(120),period6(240),Period7(480), Period8(960), Period9(1920), Period10(3840),period11(7680);
var : Sma1(0),Sma2(0),Sma3(0),Sma4(0),Sma5(0),sma6(0),Sma7(0),Sma8(0),Sma9(0),Sma10(0),sma11(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);
Sma10 = ma(C,Period10);
sma11 = ma(c,period11);
if sma1 > sma3+PriceScale*3 Then Sell("3도");
Buy("재수",AtStop,EntryPrice+PriceScale*8);
SetStopTrailing(PriceScale*4,PriceScale*15, PointStop);
if sma1 < sma3-PriceScale*3 Then Buy("3수");
sell("bs",AtStop,EntryPrice-PriceScale*8);
SetStopTrailing(PriceScale*4,PriceScale*15, Pointstop);
위 수식에서 예를들면 매수를 하였는데 지수가 하락을 하여
8틱이 손실이나면 청산과 동시에 매도를 하여 15틱이 이익으로가서
4틱이 이익에서 빠질때 청산을 해야 하는데 수식적용이
setstoptrailing 수식으로 적용이 안되고 8틱손실이 되어 매도체결과
동시에 청산되면서 매수를 또 체결하는데 setstoptrailing수식이 완료
될때까지 매매는 정지하는 수식을 부탁 드립니다.
2021-06-29
1353
글번호 150368
시스템
답변완료
지표 왜곡
안녕하세요.
지표를 이용한 시스템을 적용해보았는데 실제지표의 signal과 만든 시스템에서 나오는 진입점이 다르게 나와서 질문드립니다.
제가 생각하는 원인은 거래가능시간을 설정해서 시스템의 signal에 왜곡이 발생한것같은데 해결방법이 있을까요?
제가 원하는 방향은 1.원래지표에서 나타난 signal이 발생할때 2. 설정한 거래시간에서만 거래하고 최종시간에 청산. 이렇게입니다. 확인해주시면 감사하겠습니다.
Input : StartTime1(101500),EndTime1(165900);
var : Tcond(false);
if (sdate != sdate[1] and stime >= EndTime1) or
(sdate == sdate[1] and stime >= EndTime1 and stime[1] < EndTime1) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime1) or
(sdate == sdate[1] and stime >= StartTime1 and stime[1] < StartTime1) Then
{
Tcond = true;
SetStopEndofday(EndTime1);
}
if Tcond == true Then
{
Input : shortPeriod(12), longPeriod(26), Period(9);
value1 = MACD(shortPeriod, longPeriod);
value2 = ema(value1, Period);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
}
2021-06-28
1267
글번호 150367
시스템