예스스탁
예스스탁 답변
2021-12-27 09:30:50
안녕하세요
예스스탁입니다.
input : 고점(7000),저점(2000);
input : 투자금액(10000000);
var : entry(False),매수786(0),매수618(0),매수5(0),손절382(0),타점익절1(0),타점익절2(0);
var : day(0),EntryDay(0),타점익절1a(0),타점익절1b(0),타점익절2a(0),타점익절2b(0);
매수786 = 저점+(고점-저점)*0.786;
매수618 = 저점+(고점-저점)*0.618;
매수5 = 저점+(고점-저점)*0.5;
손절382 = 저점+(고점-저점)*0.382;
타점익절1 = 매수618+(매수786-매수618)*0.618;
타점익절1a = 매수618+(매수786-매수618)*0.5;
타점익절1b = 매수618+(매수786-매수618)*0.382;
타점익절2 = 매수5+(매수618-매수5)*0.618;
타점익절2a = 매수618+(매수786-매수618)*0.5;
타점익절2b = 매수618+(매수786-매수618)*0.382;
if Bdate != Bdate[1] Then
{
entry = true;
day = day+1;
}
if TotalTrades > TotalTrades[1] Then
entry = False;
if MarketPosition == 0 and entry == true and L > 매수618 Then
{
Buy("618매수",AtLimit,매수618,Floor(투자금액/C));
}
if MarketPosition == 1 and MaxEntries == 1 and IsEntryName("618매수") == true Then
{
Buy("5매수",AtLimit,매수5,Floor(투자금액/C));
}
if MarketPosition == 1 Then
{
if MarketPosition != MarketPosition[1] Then
{
EntryDay = day;
}
if MaxEntries == 1 Then
{
if day < EntryDay+4 Then
ExitLong("1타점익절",AtLimit,타점익절1);
if day >= EntryDay+4 and day < EntryDay+6 Then
ExitLong("1타점익절a",AtLimit,타점익절1a);
if day >= EntryDay+4 and day < EntryDay+8 Then
ExitLong("1타점익절b",AtLimit,타점익절1b);
if NextBarSdate != sDate and day == EntryDay+7 Then
ExitLong("1타점익절c",AtMarket);
}
if MaxEntries == 2 Then
{
if day < EntryDay+4 Then
ExitLong("2타점익절",AtLimit,타점익절2);
if day >= EntryDay+4 and day < EntryDay+6 Then
ExitLong("2타점익절a",AtLimit,타점익절2a);
if day >= EntryDay+4 and day < EntryDay+8 Then
ExitLong("2타점익절b",AtLimit,타점익절2b);
if NextBarSdate != sDate and day == EntryDay+7 Then
ExitLong("2타점익절c",AtMarket);
}
ExitLong("382손절",AtStop,손절382);
}
즐거운 하루되세요
> 맴맴잉 님이 쓴 글입니다.
> 제목 : 시스템식 문의 드립니다.
> 안녕하세요 항상 감사드립니다.
현재 아래의 시스템식에서 좀더 업그레이드를 하고자 합니다.
해당내용을 시스템식을 업그레이드 하는데 어려움이 있어
시스템식을 요청드립니다.
추가조건
1차 매수후 2차매수조건까지 안오고 주가가 횡보하는 상황에서
1차매수 후 4일째 시가부터 타점이
(ex)20일 월요일에 매수했으면, 23일 목요일에 타점 변경)
[타점익절1 = 매수618+(매수786-매수618)*0.618] 에서
[타점익절1a = 매수618+(매수786-매수618)*0.5] 로 변경
1차 매수후 2차매수조건까지 안오고 주가가 횡보하는 상황에서
1차매수 후 6일째 시가부터 타점이
[타점익절1 = 매수618+(매수786-매수618)*0.618] 에서
[타점익절1b = 매수618+(매수786-매수618)*0.382] 로 변경
1차 매수후 2차매수조건까지 안오고 주가가 횡보하는 상황에서
1차매수 후 8일째 시가에 청산
2차 매수후 손절조건까지 안오고 주가가 횡보하는 상황에서
2차매수 후 4일째 시가부터 타점이
[타점익절2 = 매수618+(매수786-매수618)*0.618] 에서
[타점익절2a = 매수618+(매수786-매수618)*0.5] 로 변경
2차 매수후 손절조건까지 안오고 주가가 횡보하는 상황에서
2차매수 후 6일째 시가부터 타점이
[타점익절2 = 매수618+(매수786-매수618)*0.618] 에서
[타점익절2b = 매수618+(매수786-매수618)*0.382] 로 변경
2차 매수후 손절조건까지 안오고 주가가 횡보하는 상황에서
2차매수 후 8일째 시가에 청산
현재 시스템식
-------------------------------------------------------------------
input : 고점(7000),저점(2000);
input : 투자금액(10000000);
var : entry(False),매수786(0),매수618(0),매수5(0),손절382(0),타점익절1(0),타점익절2(0);
매수786 = 저점+(고점-저점)*0.786;
매수618 = 저점+(고점-저점)*0.618;
매수5 = 저점+(고점-저점)*0.5;
손절382 = 저점+(고점-저점)*0.382;
타점익절1 = 매수618+(매수786-매수618)*0.618;
타점익절2 = 매수5+(매수618-매수5)*0.618;
if Bdate != Bdate[1] Then
entry = true;
if TotalTrades > TotalTrades[1] Then
entry = False;
if MarketPosition == 0 and entry == true and L > 매수618 Then
{
Buy("618매수",AtLimit,매수618,Floor(투자금액/C));
}
if MarketPosition == 1 and MaxEntries == 1 and IsEntryName("618매수") == true Then
{
Buy("5매수",AtLimit,매수5,Floor(투자금액/C));
}
if MarketPosition == 1 Then
{
if MaxEntries == 1 Then
{
ExitLong("1타점익절",AtLimit,타점익절1);
}
if MaxEntries == 2 Then
{
ExitLong("2타점익절",AtLimit,타점익절2);
}
ExitLong("382손절",AtStop,손절382);
}