커뮤니티

매수후 청산 수식 부탁드릴께요( 조건만족시 10만원씩 청산 )

프로필 이미지
이형지
2020-12-14 22:27:42
1268
글번호 144686
답변완료
국내 주식 tiger200 data1 tiger200 30분봉 data2 kodex200 일봉 data3 tiger200 일봉 매수 조건은 그대로 매수 청산 조건은 아래와 같이 " if MarketPosition == 1 Then { if MM > MFI값 or SS > 심리도값 or MMM > MFI값 or SSS > 심리도값 Then " 10만원씩 청산 " } " input : 일봉RSI기간(30); input : 일봉RSI값1(48),일봉RSI값2(36),일봉RSI값3(30); input : 최대투자금액(1500); input : 진입금액1(10); input : 진입금액2(15); input : 진입금액3(20); input : 진입금액4(25); input : 진입금액5(30); input : 진입금액6(35); input : 진입금액7(40); input : 진입금액8(50); input : 진입금액9(60); input : 진입금액10(70); input : 이차진입금액(100); input : 삼차진입금액(200); input : MFI기간(15),MFI값(90); input : 심리도기간(15),심리도값(80); var : mav(0,data2),MM(0,Data3),SS(0,Data3); var : MMM(0,Data2),SSS(0,Data2),Xcnt(0,Data2),Xvol(0,data1); MM = Data3(mfi(MFI기간)); SS = Data3(Simrido(심리도기간)); MMM = Data2(mfi(MFI기간)); SSS = Data2(Simrido(심리도기간)); var : vol(0); var : RSI2(0,Data2); RSI2 = Data2(RSI(일봉RSI기간)); if MarketPosition == 0 or (MarketPosition == 1 and AvgEntryPrice*CurrentContracts < 최대투자금액*10000 ) Then # and MM < MFI값 and SS < 심리도값 and MMM < MFI값 and SSS < 심리도값 Then { if data1(sTime == 93000 or sTime == 120000 ) Then # or sTime == 123000 { if Data2(RSI2 > 일봉RSI값1) Then { if MarketPosition == 0 or (MarketPosition == 1 and C >= AvgEntryPrice*0.98) Then vol = Floor(진입금액1*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.98 and C >= AvgEntryPrice*0.96 Then vol = Floor(진입금액2*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.96 and C >= AvgEntryPrice*0.94 Then vol = Floor(진입금액3*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.94 and C >= AvgEntryPrice*0.92 Then vol = Floor(진입금액4*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.92 and C >= AvgEntryPrice*0.90 Then vol = Floor(진입금액5*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.90 and C >= AvgEntryPrice*0.88 Then vol = Floor(진입금액6*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.88 and C >= AvgEntryPrice*0.86 Then vol = Floor(진입금액7*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.86 and C >= AvgEntryPrice*0.84 Then vol = Floor(진입금액8*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.84 and C >= AvgEntryPrice*0.82 Then vol = Floor(진입금액9*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.82 and C >= AvgEntryPrice*0.80 Then vol = Floor(진입금액10*10000/c); Buy("불타기매매1",OnClose,DEf,vol); } if Data2(RSI2 < 일봉RSI값2 and RSI2 > 일봉RSI값3 ) Then { Buy("하락과도매매1",OnClose,DEf,Floor(이차진입금액*10000/c)); } if Data2(RSI2 < 일봉RSI값3) Then { Buy("폭락과도매매1",OnClose,DEf,Floor(삼차진입금액*10000/c)); } } } if MarketPosition == 1 Then { if MM > MFI값 or SS > 심리도값 or MMM > MFI값 or SSS > 심리도값 Then " 10만원씩 청산 " }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-12-15 15:03:06

안녕하세요 예스스탁입니다. input : 일봉RSI기간(30); input : 일봉RSI값1(48),일봉RSI값2(36),일봉RSI값3(30); input : 최대투자금액(1500); input : 진입금액1(10); input : 진입금액2(15); input : 진입금액3(20); input : 진입금액4(25); input : 진입금액5(30); input : 진입금액6(35); input : 진입금액7(40); input : 진입금액8(50); input : 진입금액9(60); input : 진입금액10(70); input : 이차진입금액(100); input : 삼차진입금액(200); input : MFI기간(15),MFI값(90); input : 심리도기간(15),심리도값(80); var : mav(0,data2),MM(0,Data3),SS(0,Data3); var : MMM(0,Data2),SSS(0,Data2),Xcnt(0,Data2),Xvol(0,data1); MM = Data3(mfi(MFI기간)); SS = Data3(Simrido(심리도기간)); MMM = Data2(mfi(MFI기간)); SSS = Data2(Simrido(심리도기간)); var : vol(0); var : RSI2(0,Data2); RSI2 = Data2(RSI(일봉RSI기간)); if MarketPosition == 0 or (MarketPosition == 1 and AvgEntryPrice*CurrentContracts < 최대투자금액*10000 ) Then # and MM < MFI값 and SS < 심리도값 and MMM < MFI값 and SSS < 심리도값 Then { if data1(sTime == 93000 or sTime == 120000 ) Then # or sTime == 123000 { if Data2(RSI2 > 일봉RSI값1) Then { if MarketPosition == 0 or (MarketPosition == 1 and C >= AvgEntryPrice*0.98) Then vol = Floor(진입금액1*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.98 and C >= AvgEntryPrice*0.96 Then vol = Floor(진입금액2*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.96 and C >= AvgEntryPrice*0.94 Then vol = Floor(진입금액3*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.94 and C >= AvgEntryPrice*0.92 Then vol = Floor(진입금액4*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.92 and C >= AvgEntryPrice*0.90 Then vol = Floor(진입금액5*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.90 and C >= AvgEntryPrice*0.88 Then vol = Floor(진입금액6*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.88 and C >= AvgEntryPrice*0.86 Then vol = Floor(진입금액7*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.86 and C >= AvgEntryPrice*0.84 Then vol = Floor(진입금액8*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.84 and C >= AvgEntryPrice*0.82 Then vol = Floor(진입금액9*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.82 and C >= AvgEntryPrice*0.80 Then vol = Floor(진입금액10*10000/c); Buy("불타기매매1",OnClose,DEf,vol); } if Data2(RSI2 < 일봉RSI값2 and RSI2 > 일봉RSI값3 ) Then { Buy("하락과도매매1",OnClose,DEf,Floor(이차진입금액*10000/c)); } if Data2(RSI2 < 일봉RSI값3) Then { Buy("폭락과도매매1",OnClose,DEf,Floor(삼차진입금액*10000/c)); } } } if MarketPosition == 1 Then { if MM > MFI값 or SS > 심리도값 or MMM > MFI값 or SSS > 심리도값 Then { Xvol = min(CurrentContracts,(100000/C)); ExitLong("bx",OnClose,DEf,"",Xvol,2); } } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 매수후 청산 수식 부탁드릴께요( 조건만족시 10만원씩 청산 ) > 국내 주식 tiger200 data1 tiger200 30분봉 data2 kodex200 일봉 data3 tiger200 일봉 매수 조건은 그대로 매수 청산 조건은 아래와 같이 " if MarketPosition == 1 Then { if MM > MFI값 or SS > 심리도값 or MMM > MFI값 or SSS > 심리도값 Then " 10만원씩 청산 " } " input : 일봉RSI기간(30); input : 일봉RSI값1(48),일봉RSI값2(36),일봉RSI값3(30); input : 최대투자금액(1500); input : 진입금액1(10); input : 진입금액2(15); input : 진입금액3(20); input : 진입금액4(25); input : 진입금액5(30); input : 진입금액6(35); input : 진입금액7(40); input : 진입금액8(50); input : 진입금액9(60); input : 진입금액10(70); input : 이차진입금액(100); input : 삼차진입금액(200); input : MFI기간(15),MFI값(90); input : 심리도기간(15),심리도값(80); var : mav(0,data2),MM(0,Data3),SS(0,Data3); var : MMM(0,Data2),SSS(0,Data2),Xcnt(0,Data2),Xvol(0,data1); MM = Data3(mfi(MFI기간)); SS = Data3(Simrido(심리도기간)); MMM = Data2(mfi(MFI기간)); SSS = Data2(Simrido(심리도기간)); var : vol(0); var : RSI2(0,Data2); RSI2 = Data2(RSI(일봉RSI기간)); if MarketPosition == 0 or (MarketPosition == 1 and AvgEntryPrice*CurrentContracts < 최대투자금액*10000 ) Then # and MM < MFI값 and SS < 심리도값 and MMM < MFI값 and SSS < 심리도값 Then { if data1(sTime == 93000 or sTime == 120000 ) Then # or sTime == 123000 { if Data2(RSI2 > 일봉RSI값1) Then { if MarketPosition == 0 or (MarketPosition == 1 and C >= AvgEntryPrice*0.98) Then vol = Floor(진입금액1*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.98 and C >= AvgEntryPrice*0.96 Then vol = Floor(진입금액2*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.96 and C >= AvgEntryPrice*0.94 Then vol = Floor(진입금액3*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.94 and C >= AvgEntryPrice*0.92 Then vol = Floor(진입금액4*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.92 and C >= AvgEntryPrice*0.90 Then vol = Floor(진입금액5*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.90 and C >= AvgEntryPrice*0.88 Then vol = Floor(진입금액6*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.88 and C >= AvgEntryPrice*0.86 Then vol = Floor(진입금액7*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.86 and C >= AvgEntryPrice*0.84 Then vol = Floor(진입금액8*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.84 and C >= AvgEntryPrice*0.82 Then vol = Floor(진입금액9*10000/c); if MarketPosition == 1 and C < AvgEntryPrice*0.82 and C >= AvgEntryPrice*0.80 Then vol = Floor(진입금액10*10000/c); Buy("불타기매매1",OnClose,DEf,vol); } if Data2(RSI2 < 일봉RSI값2 and RSI2 > 일봉RSI값3 ) Then { Buy("하락과도매매1",OnClose,DEf,Floor(이차진입금액*10000/c)); } if Data2(RSI2 < 일봉RSI값3) Then { Buy("폭락과도매매1",OnClose,DEf,Floor(삼차진입금액*10000/c)); } } } if MarketPosition == 1 Then { if MM > MFI값 or SS > 심리도값 or MMM > MFI값 or SSS > 심리도값 Then " 10만원씩 청산 " }