예스스탁
예스스탁 답변
2020-03-26 12:48:51
안녕하세요
예스스탁입니다.
input : n(180),하락퍼센트(0.95);
input : p(20),MFI값(70);
input : 매매수(50),금액1(10),금액2(10),금액3(15),금액4(10),금액5(15),금액6(15),금액7(15),금액8(15);
input : 전일대비하락률(0.85),청산률(11);
var1 = highest(H,n);
var2 = mfi(P);
if stime < 143000 then
{
if MaxEntries < 매매수 and
c < var1*하락퍼센트 and
var2 < MFI값 and
c < o and
c <= c[1]*(100-전일대비하락률)/100 Then
buy("b1",OnClose,def,Floor(금액1*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.04) and
var2 < (MFI값-7) and
c < o and
c <= c[1]*(99.4-전일대비하락률)/100 Then
buy("b2",OnClose,def,Floor(금액2*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.08) and
var2 < (MFI값-14) and
c < o and
c <= c[1]*(99.2-전일대비하락률)/100 Then
buy("b3",OnClose,def,Floor(금액3*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.12) and
var2 < (MFI값-21) and
c < o and
c <= c[1]*(98.8-전일대비하락률)/100 Then
buy("b4",OnClose,def,Floor(금액4*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.16) and
var2 < (MFI값-28) and
c < o and
c <= c[1]*(98.4-전일대비하락률)/100 Then
buy("b5",OnClose,def,Floor(금액5*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.2) and
var2 < (MFI값-35) and
c < o and
c <= c[1]*(98.0-전일대비하락률)/100 Then
buy("b6",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.24) and
var2 < (MFI값-42) and
c < o and
c <= c[1]*(97.6-전일대비하락률)/100 Then
buy("b7",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.28) and
var2 < (MFI값-48) and
c < o and
c <= c[1]*(97.2-전일대비하락률)/100 Then
buy("b8",OnClose,def,Floor(금액6*10000/c));
if MaxEntries <= 25 Then
SetStopProfittarget(청산률,PercentStop);
Else
{
SetStopProfittarget(0);
ExitLong("bx",atlimit,AvgEntryPrice*1.03);
}
}
Else
SetStopProfittarget(0);
즐거운 하루되세요
> 이형지 님이 쓴 글입니다.
> 제목 : 수식에 대한 궁금한사항입니다.
> 아래수식에서 MaxEntries 가 50까지 진입하고 조건이되더라도 진입이 안되는 거자나요?
아래 조건에 다음과 같이 추가 기능을 구현하고 싶은데요..
총 MaxEntries는 50이라고 설정후
MaxEntries 25번까지는 개별 진입건별로 청산률 도달시 개별 청산 SetStopProfittarget(청산률,PercentStop);
MaxEntries 누적으로 1 ~ 26-50회까지는 분할매수된 종목의 총 평균매수값보다 3% 수익시 일괄청산
하는 수식으로 구현할수 있도록 변경 요청드릴께요~~
정리하면
총진입횟수가 25회까지는 청산수식이 개별 수익 청산(청산률 11%)
총진입횟수가 26회가 되어버리면 총 50회까지 청산수식이 청산안된매수값의 평균이 3%일 때 수익 청산
--> 이 수식에 대한 취지는 높은 값에서 매수된 수량을 물타기를 통해 청산하기 위함입니다.
input : n(180),하락퍼센트(0.95);
input : p(20),MFI값(70);
input : 매매수(50),금액1(10),금액2(10),금액3(15),금액4(10),금액5(15),금액6(15),금액7(15),금액8(15);
input : 전일대비하락률(0.85),청산률(11);
var1 = highest(H,n);
var2 = mfi(P);
if stime < 143000 then
{
if MaxEntries < 매매수 and
c < var1*하락퍼센트 and
var2 < MFI값 and
c < o and
c <= c[1]*(100-전일대비하락률)/100 Then
buy("b1",OnClose,def,Floor(금액1*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.04) and
var2 < (MFI값-7) and
c < o and
c <= c[1]*(99.4-전일대비하락률)/100 Then
buy("b2",OnClose,def,Floor(금액2*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.08) and
var2 < (MFI값-14) and
c < o and
c <= c[1]*(99.2-전일대비하락률)/100 Then
buy("b3",OnClose,def,Floor(금액3*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.12) and
var2 < (MFI값-21) and
c < o and
c <= c[1]*(98.8-전일대비하락률)/100 Then
buy("b4",OnClose,def,Floor(금액4*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.16) and
var2 < (MFI값-28) and
c < o and
c <= c[1]*(98.4-전일대비하락률)/100 Then
buy("b5",OnClose,def,Floor(금액5*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.2) and
var2 < (MFI값-35) and
c < o and
c <= c[1]*(98.0-전일대비하락률)/100 Then
buy("b6",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.24) and
var2 < (MFI값-42) and
c < o and
c <= c[1]*(97.6-전일대비하락률)/100 Then
buy("b7",OnClose,def,Floor(금액6*10000/c));
if MaxEntries < 매매수 and
c < var1*(하락퍼센트-0.28) and
var2 < (MFI값-48) and
c < o and
c <= c[1]*(97.2-전일대비하락률)/100 Then
buy("b8",OnClose,def,Floor(금액6*10000/c));
SetStopProfittarget(청산률,PercentStop);
}
Else
SetStopProfittarget(0);