커뮤니티

수식부탁드립니다

프로필 이미지
포커스
2023-07-07 09:48:33
776
글번호 170412
답변완료
월봉 5일선 위에 캔들이 있으면 1. kodex 200를 1차로 일봉 3일선 쌍바닥일때 30%매수하고 2차로 일봉 10일선 위에서 70%매수 2. 다음으로 일봉 3일선 쌍봉일때 50% 일봉 10일선 이탈하면 전부 매도 3. 1,2번 반복 월봉 5일선 아래에 캔들이 있으면 1. kodex 인버스를 1차로 일봉 3일선 쌍바닥일때 30%매수하고 2차로 일봉 10일선 위에서 70%매수 2. 다음으로 일봉 3일선 쌍봉일때 50% 일봉 10일선 이탈하면 전부 매도 3. 1,2번 반복 월봉 5일선 윗, 아래에 따라 kodex 100, kodex 인버스를 선택입니다. 그리고 월봉은 일봉의 30분봉, 일봉은 1분봉으로 변동할 때 변동된 수식(일봉의 30분봉, 일봉의 1분봉)만 알려주시기 바랍니다 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-07-07 14:39:47

안녕하세요 예스스탁입니다. 수식에서 종목을 선택하지 못합니다. 시스템은 거래하고자하는 종목이 차트를 열고 수식을 적용해 해당 차트의 데이타를 이용해 계산하고 신호를 발생합니다. 월봉 5일선은 어떤 종목을 기준으로 계산되는지 알수 없습니다. 적용하는 차트 기본종목으로 계산되게 작성해 드립니다. 또한 쌍바닥,쌍봉은 정확한 고점과 저점의 내용이 필요합니다. 별도 언급이 없으셔서 swinghigh,swinglow함수로 대체합니다. 1-1 kodex200 월/일 input : n(5),p1(3),p2(10); input : left(3),right(3); input : 매수금액(10000000); var : cnt(0),msum(0),mmav(0); Array : mc[50](0); value1 = ma(C,P1); Value2 = ma(C,p2); if bdate > Bdate[1]+30 Then { For cnt = 49 Downto 1 { mc[cnt] = mc[cnt-1]; } } mc[0] = c; if mc[n-1] > 0 Then { msum = 0; For cnt = 0 to n-1 { msum = msum + mc[cnt]; } mmav = msum/n; if Swinglow(1,value1,Left,right,left+right+1) != -1 Then { var1 = value1[right]; Var2 = var1[1]; if MarketPosition == 0 and var1 < Var2 and Var2 > 0 and C > mmav Then Buy("b1",OnClose,Def,Floor((매수금액*0.3)/c)); } if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if MaxEntries == 1 and C > Value2 Then Buy("b2",OnClose,Def,Floor((매수금액*0.7)/c)); if CrossDown(c,Value2) and Condition2 == False Then ExitLong("bx2",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } Else { Condition1 = False; Condition2 = False; } if SwingHigh(1,value1,Left,right,left+right+1) != -1 Then { Var3 = value1[right]; Var34 = Var3[1]; if MarketPosition == 1 and Var3 > Var4 and Var4 > 0 and Condition1 == False Then ExitLong("bx1",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } } 1-2 인버스 월/일 input : n(5),p1(3),p2(10); input : left(3),right(3); input : 매수금액(10000000); var : cnt(0),msum(0),mmav(0); Array : mc[50](0); value1 = ma(C,P1); Value2 = ma(C,p2); if bdate > Bdate[1]+30 Then { For cnt = 49 Downto 1 { mc[cnt] = mc[cnt-1]; } } mc[0] = c; if mc[n-1] > 0 Then { msum = 0; For cnt = 0 to n-1 { msum = msum + mc[cnt]; } mmav = msum/n; if Swinglow(1,value1,Left,right,left+right+1) != -1 Then { var1 = value1[right]; Var2 = var1[1]; if MarketPosition == 0 and var1 < Var2 and Var2 > 0 and C < mmav Then Buy("b1",OnClose,Def,Floor((매수금액*0.3)/c)); } if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if MaxEntries == 1 and C > Value2 Then Buy("b2",OnClose,Def,Floor((매수금액*0.7)/c)); if CrossDown(c,Value2) and Condition2 == False Then ExitLong("bx2",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } Else { Condition1 = False; Condition2 = False; } if SwingHigh(1,value1,Left,right,left+right+1) != -1 Then { Var3 = value1[right]; Var34 = Var3[1]; if MarketPosition == 1 and Var3 > Var4 and Var4 > 0 and Condition1 == False Then ExitLong("bx1",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } } 2-1 일/분 input : n(5),p1(3),p2(10); input : left(3),right(3); input : 매수금액(10000000); var : cnt(0),msum(0),mmav(0); value1 = ma(C,p1); Value2 = ma(C,p2); if DayClose(n-1) > 0 Then { msum = 0; For cnt = 0 to n-1 { msum = msum + DayClose(cnt); } mmav = msum/n; if Swinglow(1,value1,Left,right,left+right+1) != -1 Then { var1 = value1[right]; Var2 = var1[1]; if MarketPosition == 0 and var1 < Var2 and Var2 > 0 and C > mmav Then Buy("b1",OnClose,Def,Floor((매수금액*0.3)/c)); } if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if MaxEntries == 1 and C > Value2 Then Buy("b2",OnClose,Def,Floor((매수금액*0.7)/c)); if CrossDown(c,Value2) and Condition2 == False Then ExitLong("bx2",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } Else { Condition1 = False; Condition2 = False; } if SwingHigh(1,value1,Left,right,left+right+1) != -1 Then { Var3 = value1[right]; Var34 = Var3[1]; if MarketPosition == 1 and Var3 > Var4 and Var4 > 0 and Condition1 == False Then ExitLong("bx1",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } } 2-2 일/분 input : n(5),p1(3),p2(10); input : left(3),right(3); input : 매수금액(10000000); var : cnt(0),msum(0),mmav(0); value1 = ma(C,p1); Value2 = ma(C,p2); if DayClose(n-1) > 0 Then { msum = 0; For cnt = 0 to n-1 { msum = msum + DayClose(cnt); } mmav = msum/n; if Swinglow(1,value1,Left,right,left+right+1) != -1 Then { var1 = value1[right]; Var2 = var1[1]; if MarketPosition == 0 and var1 < Var2 and Var2 > 0 and C < mmav Then Buy("b1",OnClose,Def,Floor((매수금액*0.3)/c)); } if MarketPosition == 1 Then { if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx1" Then Condition1 = true; if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx2" Then Condition2 = true; if MaxEntries == 1 and C > Value2 Then Buy("b2",OnClose,Def,Floor((매수금액*0.7)/c)); if CrossDown(c,Value2) and Condition2 == False Then ExitLong("bx2",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } Else { Condition1 = False; Condition2 = False; } if SwingHigh(1,value1,Left,right,left+right+1) != -1 Then { Var3 = value1[right]; Var34 = Var3[1]; if MarketPosition == 1 and Var3 > Var4 and Var4 > 0 and Condition1 == False Then ExitLong("bx1",OnClose,Def,"",IFf(CurrentContracts == MaxContracts,Floor(MaxContracts*0.5),CurrentContracts),1); } } 즐거운 하루되세요 > 포커스 님이 쓴 글입니다. > 제목 : 수식부탁드립니다 > 월봉 5일선 위에 캔들이 있으면 1. kodex 200를 1차로 일봉 3일선 쌍바닥일때 30%매수하고 2차로 일봉 10일선 위에서 70%매수 2. 다음으로 일봉 3일선 쌍봉일때 50% 일봉 10일선 이탈하면 전부 매도 3. 1,2번 반복 월봉 5일선 아래에 캔들이 있으면 1. kodex 인버스를 1차로 일봉 3일선 쌍바닥일때 30%매수하고 2차로 일봉 10일선 위에서 70%매수 2. 다음으로 일봉 3일선 쌍봉일때 50% 일봉 10일선 이탈하면 전부 매도 3. 1,2번 반복 월봉 5일선 윗, 아래에 따라 kodex 100, kodex 인버스를 선택입니다. 그리고 월봉은 일봉의 30분봉, 일봉은 1분봉으로 변동할 때 변동된 수식(일봉의 30분봉, 일봉의 1분봉)만 알려주시기 바랍니다 감사합니다