커뮤니티

[16427] 답글 확인 부탁드립니다. ...내용무

프로필 이미지
새로운세상
2010-12-08 18:00:22
487
글번호 34181
답변완료
..
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-12-09 09:27:13

안녕하세요 예스스탁입니다. 죄송합니다. 식이 누적되서 올라갔습니다. input : 당일손익(-2); var : PLR(0),XCommission(0),XSlippage(0),OpenPL(0),dayPL(0),count(0),Loss(0),Profit(0); XCommission = ((C*ExitCommission)/100)*CurrentContracts; #%설정 XSlippage = (ExitSlippage)*CurrentContracts; #Pt설정 PLR = 0; count = 0; Loss = 0; Profit = 0; for var1 = 0 to 10{ if sdate == EntryDate(var1) Then count = count+1; if var1 > 0 Then{ if sdate == EntryDate(var1) Then PLR = PLR+PositionProfit(var1); if sdate == ExitDate(var1) and PositionProfit(var1) < 0 Then loss = loss + 1; if sdate == ExitDate(var1) and PositionProfit(var1) > 0 Then Profit = Profit + 1; } } if MarketPosition() == 0 Then{ OpenPL = 0; dayPL = PLR; } Else{ OpenPL = (PositionProfit-(XCommission+XSlippage)); dayPL = PLR+OpenPL; } if dayPL > 당일손익 and count < 8 and Profit < 3 and Loss < 5 Then{ if C > ma(c,20) Then buy("b"); if C < ma(c,20) Then Sell("S"); } if MarketPosition == 1 and CrossDown(c,ma(c,20)) Then exitlong("BX"); if MarketPosition == -1 and CrossUp(c,ma(c,20)) Then ExitShort("SX"); if MarketPosition() == 1 and CrossDown(dayPL,당일손익) Then exitlong("XX"); if MarketPosition() == -1 and CrossDown(dayPL,당일손익) Then ExitShort("XX."); 즐거운 하루되세요 > 새로운세상 님이 쓴 글입니다. > 제목 : [16427] 답글 확인 부탁드립니다. ...내용무 > ..