커뮤니티

매수후 일정한 수익이 발생하지 않으면 청산하지 않는식

프로필 이미지
실상사
2012-08-02 08:19:46
228
글번호 53443
답변완료
시스템식에서 예를 들어 Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); # 매수/매도청산 If CrossUP(value, 20) Then { Buy(); } # 매도/매수청산 If CrossDown(value, 80) Then { Sell(); } 매도 청산시에 매수가 보다 3% 이상 높지 않으면 청산하지 않는다를 수식으로 작성좀 해주십시오 If MarketPosition == 1 and EntryPrice < c*1.03 and CrossDown(value, 80) Then { Sell(); } 매수 유지상태에서 진입가보다 3% 이상 높은 상태에서 데드크로스가 나오면 청산하라 이 수식으로는 정상적으로 나오지가 않네요 추가질문인데요 피라미딩 청산식좀 부탁드립니다 위 시스템식으로 기준으로 진입가보다 3% 이상이면 30% 청산(매수량의) 진입가보다 5% 이상이면 30% 청산 진입가보다 8% 이상이면 40% 청산 두가지입니다 요약하면 진입후 3%이상 수익이 나지 않으면 청산하지 않고 손실이 나더라도 매수상태를 유지한다 또 하나는 진입한 이후 수익이 3% 이상 발생하면 매수량의 30%를 청산하고 나머지는 단계적으로 청산한다 입니다 휴가철인데 질문을 드려서 죄송합니다 건강한 여름 보내세요
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2012-08-02 11:19:42

안녕하세요 예스스탁입니다. 1. Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); If MarketPosition == 0 and CrossUP(value, 20) Then Buy(); If MarketPosition == 0 and CrossDown(value, 80) Then Sell(); #매수진입가에서 3%이상 높을때만 80하향이탈할때 청산 If MarketPosition == 1 and EntryPrice >= c*1.03 and CrossDown(value, 80) Then ExitLong(); #매도진입가에서 3%이상 낮을때만 20상향돌파할때 청산 If MarketPosition == 1 and EntryPrice <= c*0.97 and CrossDown(value, 80) Then ExitLong(); 2. Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); If MarketPosition == 0 and CrossUP(value, 20) Then Buy(); If MarketPosition == 0 and CrossDown(value, 80) Then Sell(); if MarketPosition == 1 Then{ if CurrentContracts == MaxContracts and CurrentEntries > CurrentEntries[1] Then{ if CodeCategory == 1 Then{ if BasePrice < 50000 Then Var11 = int(int(CurrentContracts*0.3)/10)*10; Else Var11 = int(CurrentContracts*0.3); } if CodeCategory == 2 or Then Var11 = int(CurrentContracts*0.3); } exitlong("bx1",AtStop,EntryPrice*1.03,"",var11,1); exitlong("bx2",AtStop,EntryPrice*1.05,"",var11,1); exitlong("bx3",AtStop,EntryPrice*1.08); } if MarketPosition == -1 Then{ if CurrentContracts == MaxContracts and CurrentEntries > CurrentEntries[1] Then{ if CodeCategory == 1 Then{ if BasePrice < 50000 Then Var12 = int(int(CurrentContracts*0.3)/10)*10; Else Var12 = int(CurrentContracts*0.3); } if CodeCategory == 2 Then Var12 = int(CurrentContracts*0.3); } ExitShort("sx1",AtStop,EntryPrice*0.97,"",var12,1); ExitShort("sx2",AtStop,EntryPrice*0.95,"",var12,1); ExitShort("sx3",AtStop,EntryPrice*0.92); } 즐거운 하루되세요 > 실상사 님이 쓴 글입니다. > 제목 : 매수후 일정한 수익이 발생하지 않으면 청산하지 않는식 > 시스템식에서 예를 들어 Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); # 매수/매도청산 If CrossUP(value, 20) Then { Buy(); } # 매도/매수청산 If CrossDown(value, 80) Then { Sell(); } 매도 청산시에 매수가 보다 3% 이상 높지 않으면 청산하지 않는다를 수식으로 작성좀 해주십시오 If MarketPosition == 1 and EntryPrice < c*1.03 and CrossDown(value, 80) Then { Sell(); } 매수 유지상태에서 진입가보다 3% 이상 높은 상태에서 데드크로스가 나오면 청산하라 이 수식으로는 정상적으로 나오지가 않네요 추가질문인데요 피라미딩 청산식좀 부탁드립니다 위 시스템식으로 기준으로 진입가보다 3% 이상이면 30% 청산(매수량의) 진입가보다 5% 이상이면 30% 청산 진입가보다 8% 이상이면 40% 청산 두가지입니다 요약하면 진입후 3%이상 수익이 나지 않으면 청산하지 않고 손실이 나더라도 매수상태를 유지한다 또 하나는 진입한 이후 수익이 3% 이상 발생하면 매수량의 30%를 청산하고 나머지는 단계적으로 청산한다 입니다 휴가철인데 질문을 드려서 죄송합니다 건강한 여름 보내세요
프로필 이미지

실상사

2012-08-03 09:21:47

3프로 이상 수익이 발생한후에 청산이 안되는데 이해가 안됩니다 > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 매수후 일정한 수익이 발생하지 않으면 청산하지 않는식 > 안녕하세요 예스스탁입니다. 1. Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); If MarketPosition == 0 and CrossUP(value, 20) Then Buy(); If MarketPosition == 0 and CrossDown(value, 80) Then Sell(); #매수진입가에서 3%이상 높을때만 80하향이탈할때 청산 If MarketPosition == 1 and EntryPrice >= c*1.03 and CrossDown(value, 80) Then ExitLong(); #매도진입가에서 3%이상 낮을때만 20상향돌파할때 청산 If MarketPosition == 1 and EntryPrice <= c*0.97 and CrossDown(value, 80) Then ExitLong(); 2. Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); If MarketPosition == 0 and CrossUP(value, 20) Then Buy(); If MarketPosition == 0 and CrossDown(value, 80) Then Sell(); if MarketPosition == 1 Then{ if CurrentContracts == MaxContracts and CurrentEntries > CurrentEntries[1] Then{ if CodeCategory == 1 Then{ if BasePrice < 50000 Then Var11 = int(int(CurrentContracts*0.3)/10)*10; Else Var11 = int(CurrentContracts*0.3); } if CodeCategory == 2 or Then Var11 = int(CurrentContracts*0.3); } exitlong("bx1",AtStop,EntryPrice*1.03,"",var11,1); exitlong("bx2",AtStop,EntryPrice*1.05,"",var11,1); exitlong("bx3",AtStop,EntryPrice*1.08); } if MarketPosition == -1 Then{ if CurrentContracts == MaxContracts and CurrentEntries > CurrentEntries[1] Then{ if CodeCategory == 1 Then{ if BasePrice < 50000 Then Var12 = int(int(CurrentContracts*0.3)/10)*10; Else Var12 = int(CurrentContracts*0.3); } if CodeCategory == 2 Then Var12 = int(CurrentContracts*0.3); } ExitShort("sx1",AtStop,EntryPrice*0.97,"",var12,1); ExitShort("sx2",AtStop,EntryPrice*0.95,"",var12,1); ExitShort("sx3",AtStop,EntryPrice*0.92); } 즐거운 하루되세요 > 실상사 님이 쓴 글입니다. > 제목 : 매수후 일정한 수익이 발생하지 않으면 청산하지 않는식 > 시스템식에서 예를 들어 Input : Period(12), Period1(5); Var : value(0); value = StochasticsK(Period,Period1); # 매수/매도청산 If CrossUP(value, 20) Then { Buy(); } # 매도/매수청산 If CrossDown(value, 80) Then { Sell(); } 매도 청산시에 매수가 보다 3% 이상 높지 않으면 청산하지 않는다를 수식으로 작성좀 해주십시오 If MarketPosition == 1 and EntryPrice < c*1.03 and CrossDown(value, 80) Then { Sell(); } 매수 유지상태에서 진입가보다 3% 이상 높은 상태에서 데드크로스가 나오면 청산하라 이 수식으로는 정상적으로 나오지가 않네요 추가질문인데요 피라미딩 청산식좀 부탁드립니다 위 시스템식으로 기준으로 진입가보다 3% 이상이면 30% 청산(매수량의) 진입가보다 5% 이상이면 30% 청산 진입가보다 8% 이상이면 40% 청산 두가지입니다 요약하면 진입후 3%이상 수익이 나지 않으면 청산하지 않고 손실이 나더라도 매수상태를 유지한다 또 하나는 진입한 이후 수익이 3% 이상 발생하면 매수량의 30%를 청산하고 나머지는 단계적으로 청산한다 입니다 휴가철인데 질문을 드려서 죄송합니다 건강한 여름 보내세요