커뮤니티

수식 문의 드립니다.

프로필 이미지
회원
2013-12-23 07:22:14
145
글번호 70717
답변완료
진입별 청산식을 하려는데 잘 안됩니다. 1. 매수조건이 4가지 인데 청산을 따로 따로 하려 합니다. 매수 조건은 If C>O[0] and (c < value1) and (H[2]<value3) and stime < 150000 Then Buy("매수1"); if C[1] < O[1] and (O[1] >value3) and CrossUp(C,value4) and (value2>value3) and (C > O) and stime < 150000 Then buy("매수2"); If CrossUp(c,dis) and C>O and stime < 150000 Then buy("매수3"); If CrossUp(value2,value3) and C <= O and stime < 150000 Then buy("매수4"); 일때 매수1은 5틱 상승시 60% 청산 하고 40%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱 매수2는 10틱 상승시 50% 청산하고 50%는 최대수익대비 하락으로(최대수익10% 대비 하락5%)로 청산. 손절은 5틱 매수3은 10틱 상승시 70% 청산하고 30%는 최대수익대비하락으로 (최대수익15% 대비 하락5%)로 청산. 손절은 5틱 매수4는 5틱 상승시 80% 청산하고 20%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱 이렇게 부탁 드립니다. 2. 이격도 매수 조건 부탁 드립니다. 예를 들어 20 이격도가 100 이하에 있다가 103을 돌파하는 시점(현재봉)에 매수를 하려는데 이미 100을 돌파한후 횡보하다가 103을 돌파하는 종목도 같이 신호가 나옵니다. 어떤 방법이 있는지 수식 부탁 드립니다. 3.1봉전의 상승폭을 구하는 식인데요 1봉전이 1~1.5% 상승한 양봉을 찾는 식 부탁 드립니다. 수고하세요.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-12-23 13:32:29

안녕하세요 예스스탁입니다 1. var : Xvol(0); if MarketPosition == 1 and IsEntryName("매수1") ==true Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then xvol = int(int((MaxContracts*0.6)/10)*10); Else Xvol = int(MaxContracts*0.6); ExitLong("BL1",AtStop,EntryPrice-PriceScale*4); if CurrentContracts == MaxContracts Then ExitLong("BX11",atlimit,EntryPrice+PriceScale*5,"",Xvol,1); if CurrentContracts == MaxContracts and highest(H,BarsSinceEntry) >= EntryPrice*1.07 Then exitlong("BX12",AtStop,highest(H,BarsSinceEntry)*0.95); } if MarketPosition == 1 and IsEntryName("매수2") ==true Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then xvol = int(int((MaxContracts*0.5)/10)*10); Else Xvol = int(MaxContracts*0.5); ExitLong("BL2",AtStop,EntryPrice-PriceScale*5); if CurrentContracts == MaxContracts Then ExitLong("BX21",atlimit,EntryPrice+PriceScale*10,"",Xvol,1); if CurrentContracts == MaxContracts and highest(H,BarsSinceEntry) >= EntryPrice*1.10 Then exitlong("BX22",AtStop,highest(H,BarsSinceEntry)*0.95); } if MarketPosition == 1 and IsEntryName("매수3") ==true Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then xvol = int(int((MaxContracts*0.7)/10)*10); Else Xvol = int(MaxContracts*0.7); ExitLong("BL3",AtStop,EntryPrice-PriceScale*5); if CurrentContracts == MaxContracts Then ExitLong("BX31",atlimit,EntryPrice+PriceScale*10,"",Xvol,1); if CurrentContracts == MaxContracts and highest(H,BarsSinceEntry) >= EntryPrice*1.15 Then exitlong("BX32",AtStop,highest(H,BarsSinceEntry)*0.95); } if MarketPosition == 1 and IsEntryName("매수4") ==true Then{ if CodeCategoryEx == 11 and BasePrice < 50000 Then xvol = int(int((MaxContracts*0.7)/10)*10); Else Xvol = int(MaxContracts*0.7); ExitLong("BL4",AtStop,EntryPrice-PriceScale*4); if CurrentContracts == MaxContracts Then ExitLong("BX41",atlimit,EntryPrice+PriceScale*5,"",Xvol,1); if CurrentContracts == MaxContracts and highest(H,BarsSinceEntry) >= EntryPrice*1.07 Then exitlong("BX42",AtStop,highest(H,BarsSinceEntry)*0.95); } 2. input : P(20); var1 = Disparity(P); if crossup(var1,103) and var1[1] < 100 Then find(1); 3. var1 = (C-C[1])/C[1]*100; if var1[1] >= 1 and var1[1] <= 1.05 Then find(1); 즐거운 하루되세요 > HI_h6***** 님이 쓴 글입니다. > 제목 : 수식 문의 드립니다. > 진입별 청산식을 하려는데 잘 안됩니다. 1. 매수조건이 4가지 인데 청산을 따로 따로 하려 합니다. 매수 조건은 If C>O[0] and (c < value1) and (H[2]<value3) and stime < 150000 Then Buy("매수1"); if C[1] < O[1] and (O[1] >value3) and CrossUp(C,value4) and (value2>value3) and (C > O) and stime < 150000 Then buy("매수2"); If CrossUp(c,dis) and C>O and stime < 150000 Then buy("매수3"); If CrossUp(value2,value3) and C <= O and stime < 150000 Then buy("매수4"); 일때 매수1은 5틱 상승시 60% 청산 하고 40%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱 매수2는 10틱 상승시 50% 청산하고 50%는 최대수익대비 하락으로(최대수익10% 대비 하락5%)로 청산. 손절은 5틱 매수3은 10틱 상승시 70% 청산하고 30%는 최대수익대비하락으로 (최대수익15% 대비 하락5%)로 청산. 손절은 5틱 매수4는 5틱 상승시 80% 청산하고 20%는 최대수익대비 하락으로(최대수익7% 대비 하락5%)로 청산. 손절은 4틱 이렇게 부탁 드립니다. 2. 이격도 매수 조건 부탁 드립니다. 예를 들어 20 이격도가 100 이하에 있다가 103을 돌파하는 시점(현재봉)에 매수를 하려는데 이미 100을 돌파한후 횡보하다가 103을 돌파하는 종목도 같이 신호가 나옵니다. 어떤 방법이 있는지 수식 부탁 드립니다. 3.1봉전의 상승폭을 구하는 식인데요 1봉전이 1~1.5% 상승한 양봉을 찾는 식 부탁 드립니다. 수고하세요.