커뮤니티

7778번 재질문좀 봐주세요

프로필 이미지
송아지
2008-07-18 11:56:46
1270
글번호 16280
답변완료
감사합니다
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2008-07-18 12:39:09

안녕하세요 예스스탁입니다. INPUT : 투입자금(10000000); var : Bcond1(0),Bcond2(0),Bcond3(0),Bcond4(0),Bcond5(0); var : Scond1(0),Scond2(0),Scond3(0),Scond4(0),Scond5(0); value1 = 투입자금+GrossProfit; var1 = int((value1/(Close*100000))); if MarketPosition() == 0 then{ Bcond1 = 0; Bcond2 = 0; Bcond3 = 0; Bcond4 = 0; Bcond5 = 0; Scond1 = 0; Scond2 = 0; Scond3 = 0; Scond4 = 0; Scond5 = 0; } IF Bcond1 < 1 and CrossUp(ma(c,5),ma(c,20)) Then{ buy("매수1",onclose,def,var1); Bcond1 = 1; } if Bcond2 < 1 and C > ma(c,ma(c,5)) Then{ buy("매수2",onclose,def,var1); Bcond2 = 1; } if Bcond3 < 1 and C > ma(c,ma(c,20)) Then{ buy("매수3",onclose,def,var1); Bcond3 = 1; } if Bcond4 < 1 and accumn(iff(C>O,1,0),3) == 3 and AccumN(iff(C>ma(c,5),1,0),3) == 3 Then{ buy("매수4",onclose,def,var1); Bcond4 = 1; } if Bcond5 < 1 and crossup(ma(c,5),ma(c,60)) Then{ buy("매수5",onclose,def,var1); Bcond5 = 1; } if Bcond1 == 1 and Bcond2 == 1 and Bcond3 == 1 and Bcond4 == 1 and Bcond5 == 1 Then{ if MarketPosition() == 1 Then{ if Scond1 < 1 and crossup(c,EntryPrice*1.1) Then{ exitlong("매수청산1",OnClose,def,"",var1,1); Scond1 = 1; } if Scond2 < 1 and crossup(c,EntryPrice*1.2) Then{ exitlong("매수청산2",OnClose,def,"",var1,1); Scond2 = 1; } if Scond3 < 1 and CrossDown(ma(c,5),ma(c,20)) Then{ exitlong("매수청산3",OnClose,def,"",var1,1); Scond3 = 1; } if Scond4 < 1 and accumn(iff(C < ma(c,5),1,0),3) == 3 Then{ exitlong("매수청산4",OnClose,def,"",var1,1); Scond4 = 1; } if Scond5 < 1 and Highest(H,BarsSinceEntry) >= AvgEntryPrice()*1.2 and C <= Highest(H,BarsSinceEntry)*0.9 Then{ exitlong("매수청산5",OnClose,def,"",var1,1); Scond5 = 1; } } } 즐거운 하루되세요 > 송아지 님이 쓴 글입니다. > 제목 : 7778번 재질문좀 봐주세요 > 감사합니다
프로필 이미지

송아지

2008-07-18 13:35:29

고맙습니다 =========== > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 7778번 재질문좀 봐주세요 > 안녕하세요 예스스탁입니다. INPUT : 투입자금(10000000); var : Bcond1(0),Bcond2(0),Bcond3(0),Bcond4(0),Bcond5(0); var : Scond1(0),Scond2(0),Scond3(0),Scond4(0),Scond5(0); value1 = 투입자금+GrossProfit; var1 = int((value1/(Close*100000))); if MarketPosition() == 0 then{ Bcond1 = 0; Bcond2 = 0; Bcond3 = 0; Bcond4 = 0; Bcond5 = 0; Scond1 = 0; Scond2 = 0; Scond3 = 0; Scond4 = 0; Scond5 = 0; } IF Bcond1 < 1 and CrossUp(ma(c,5),ma(c,20)) Then{ buy("매수1",onclose,def,var1); Bcond1 = 1; } if Bcond2 < 1 and C > ma(c,ma(c,5)) Then{ buy("매수2",onclose,def,var1); Bcond2 = 1; } if Bcond3 < 1 and C > ma(c,ma(c,20)) Then{ buy("매수3",onclose,def,var1); Bcond3 = 1; } if Bcond4 < 1 and accumn(iff(C>O,1,0),3) == 3 and AccumN(iff(C>ma(c,5),1,0),3) == 3 Then{ buy("매수4",onclose,def,var1); Bcond4 = 1; } if Bcond5 < 1 and crossup(ma(c,5),ma(c,60)) Then{ buy("매수5",onclose,def,var1); Bcond5 = 1; } if Bcond1 == 1 and Bcond2 == 1 and Bcond3 == 1 and Bcond4 == 1 and Bcond5 == 1 Then{ if MarketPosition() == 1 Then{ if Scond1 < 1 and crossup(c,EntryPrice*1.1) Then{ exitlong("매수청산1",OnClose,def,"",var1,1); Scond1 = 1; } if Scond2 < 1 and crossup(c,EntryPrice*1.2) Then{ exitlong("매수청산2",OnClose,def,"",var1,1); Scond2 = 1; } if Scond3 < 1 and CrossDown(ma(c,5),ma(c,20)) Then{ exitlong("매수청산3",OnClose,def,"",var1,1); Scond3 = 1; } if Scond4 < 1 and accumn(iff(C < ma(c,5),1,0),3) == 3 Then{ exitlong("매수청산4",OnClose,def,"",var1,1); Scond4 = 1; } if Scond5 < 1 and Highest(H,BarsSinceEntry) >= AvgEntryPrice()*1.2 and C <= Highest(H,BarsSinceEntry)*0.9 Then{ exitlong("매수청산5",OnClose,def,"",var1,1); Scond5 = 1; } } } 즐거운 하루되세요 > 송아지 님이 쓴 글입니다. > 제목 : 7778번 재질문좀 봐주세요 > 감사합니다