커뮤니티

분할 매수 및 청산 수식

프로필 이미지
이형지
2020-03-31 23:43:24
696
글번호 137409
답변완료
총 10번 매매(분할매수) 200봉에서 20% 하락했을 1차 매수 진입 1차매수한 금액의 -10% 하락시 2차 추가 매수 1차매수한 금액의 -20% 하락시 3차 추가 매수 ' ' ' 1차 매수한 금액의 -90%하락시 10차 추가 매수 청산은 분할매수한 평균값의 10% 수익시 청산하는 수식입니다. 나름 만들어 봤는데요 아래수식에 수정 요청드림니다. input : n(200),하락퍼센트(0.80); input : 매매수(10),금액1(10),금액2(20),금액3(30),금액4(100),금액5(200),금액6(200),금액7(300),금액8(300),금액9(300);,금액10(300);; input : 일괄청산률(9); var1 = highest(H,n); if stime < 143000 then { if MaxEntries < 매매수 and c < var1*하락퍼센트 and c < o Then buy("b1",OnClose,def,Floor(금액1*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.9% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b2",OnClose,def,Floor(금액2*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.8% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b3",OnClose,def,Floor(금액3*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.7% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b4",OnClose,def,Floor(금액4*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.6% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b5",OnClose,def,Floor(금액5*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.5% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b6",OnClose,def,Floor(금액6*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.4% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b7",OnClose,def,Floor(금액7*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.3% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b8",OnClose,def,Floor(금액8*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.2% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b9",OnClose,def,Floor(금액9*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.1% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b10",OnClose,def,Floor(금액10*10000/c)); SetStopProfittarget(0); ExitLong("bx",atlimit,AvgEntryPrice*(1+일괄청산률*0.01)); } Else SetStopProfittarget(0);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-01 18:46:55

안녕하세요 예스스탁입니다. 피라미딩을 모든진입신호 허용으로 설정하고 적용하시면 됩니다. input : n(200),하락퍼센트(20),추가진입하락퍼센트(10),일괄청산률(9); input : 매매수(10),금액1(10),금액2(20),금액3(30),금액4(100),금액5(200),금액6(200),금액7(300),금액8(300),금액9(300),금액10(300); var : mm(0); var1 = highest(H,n); if stime < 143000 then { if MarketPosition == 0 and c < var1*(1-하락퍼센트/100) and c < o Then buy("b",OnClose,def,Floor(금액1*10000/c)); if MarketPosition == 1 then { if MaxEntries < 매매수 and c < EntryPrice*(1-(추가진입하락퍼센트*MaxEntries)/100) and C < O Then { if MaxEntries == 1 Then mm = 금액2; if MaxEntries == 2 Then mm = 금액3; if MaxEntries == 3 Then mm = 금액4; if MaxEntries == 4 then mm = 금액5; if MaxEntries == 5 Then mm = 금액6; if MaxEntries == 6 Then mm = 금액7; if MaxEntries == 7 Then mm = 금액8; if MaxEntries == 8 Then mm = 금액9; if MaxEntries == 9 Then mm = 금액10; buy("bb",OnClose,def,Floor(MM*10000/c)); } ExitLong("bx",atlimit,AvgEntryPrice*(1+일괄청산률/100)); } } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 분할 매수 및 청산 수식 > 총 10번 매매(분할매수) 200봉에서 20% 하락했을 1차 매수 진입 1차매수한 금액의 -10% 하락시 2차 추가 매수 1차매수한 금액의 -20% 하락시 3차 추가 매수 ' ' ' 1차 매수한 금액의 -90%하락시 10차 추가 매수 청산은 분할매수한 평균값의 10% 수익시 청산하는 수식입니다. 나름 만들어 봤는데요 아래수식에 수정 요청드림니다. input : n(200),하락퍼센트(0.80); input : 매매수(10),금액1(10),금액2(20),금액3(30),금액4(100),금액5(200),금액6(200),금액7(300),금액8(300),금액9(300);,금액10(300);; input : 일괄청산률(9); var1 = highest(H,n); if stime < 143000 then { if MaxEntries < 매매수 and c < var1*하락퍼센트 and c < o Then buy("b1",OnClose,def,Floor(금액1*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.9% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b2",OnClose,def,Floor(금액2*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.8% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b3",OnClose,def,Floor(금액3*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.7% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b4",OnClose,def,Floor(금액4*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.6% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b5",OnClose,def,Floor(금액5*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.5% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b6",OnClose,def,Floor(금액6*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.4% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b7",OnClose,def,Floor(금액7*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.3% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b8",OnClose,def,Floor(금액8*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.2% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b9",OnClose,def,Floor(금액9*10000/c)); if MaxEntries < 매매수 and c < first-enter-price *0.1% and < --- 수식을 잘 모르겠습니다. c < o Then buy("b10",OnClose,def,Floor(금액10*10000/c)); SetStopProfittarget(0); ExitLong("bx",atlimit,AvgEntryPrice*(1+일괄청산률*0.01)); } Else SetStopProfittarget(0);