커뮤니티

셀 주문이 손절이 안되요!!

프로필 이미지
기초부터다시
2010-12-14 17:02:13
617
글번호 34322
답변완료

첨부 이미지

/*그림을 보면 마지막 셀주문이 손절이 안나와요*/ Input : root1(260),OK(1),n1(0.5),n2(0.5),count(100),nn1(0.5),nn2(0.5); Var : cnt(0),entriestoday(0); If OK == 1 Then var1= root1; entriestoday = 0; For cnt = 0 to 10 { If sDate == EntryDate() Then entriestoday = entriestoday+1; } If MarketPosition == 0 and OK== 1 and L > var1 - n1 and entriestoday < count Then Buy("첫번재바이1",atlimit,root1-n1); If MarketPosition == 0 and OK==1 and H <var1 + n2 and entriestoday < count Then Sell("첫번째셀1",AtLimit,root1+n2); If MarketPosition == 1 Then ExitLong("첫번째바이이익정리1",AtLimit,EntryPrice+nn1); If MarketPosition == 1 and L < EntryPrice-nn1 Then ExitLong("첫번째바이손실정리1",AtStop, EntryPrice-nn1); If MarketPosition == -1 Then ExitShort("첫번째셀이익1",atlimit,EntryPrice-nn2); If MarketPosition ==1 and H > EntryPrice+nn2 Then ExitShort("첫번째셀손실1",AtStop, EntryPrice+nn2 );
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2010-12-15 10:19:05

안녕하세요 예스스탁입니다. Input : root1(260),OK(1),n1(0.5),n2(0.5),count(100),nn1(0.5),nn2(0.5); Var : cnt(0),entriestoday(0); If OK == 1 Then var1= root1; entriestoday = 0; For cnt = 0 to 10 { If sDate == EntryDate() Then entriestoday = entriestoday+1; } If MarketPosition == 0 and OK== 1 and L > var1 - n1 and entriestoday < count Then Buy("첫번재바이1",atlimit,root1-n1); If MarketPosition == 0 and OK==1 and H <var1 + n2 and entriestoday < count Then Sell("첫번째셀1",AtLimit,root1+n2); If MarketPosition == 1 Then ExitLong("첫번째바이이익정리1",AtLimit,EntryPrice+nn1); If MarketPosition == 1 and L < EntryPrice-nn1 Then ExitLong("첫번째바이손실정리1",AtStop, EntryPrice-nn1); If MarketPosition == -1 Then ExitShort("첫번째셀이익1",atlimit,EntryPrice-nn2); If MarketPosition == -1 and H > EntryPrice+nn2 Then ExitShort("첫번째셀손실1",AtStop, EntryPrice+nn2 ); 즐거운 하루되세요 > 따불 님이 쓴 글입니다. > 제목 : 셀 주문이 손절이 안되요!! > /*그림을 보면 마지막 셀주문이 손절이 안나와요*/ Input : root1(260),OK(1),n1(0.5),n2(0.5),count(100),nn1(0.5),nn2(0.5); Var : cnt(0),entriestoday(0); If OK == 1 Then var1= root1; entriestoday = 0; For cnt = 0 to 10 { If sDate == EntryDate() Then entriestoday = entriestoday+1; } If MarketPosition == 0 and OK== 1 and L > var1 - n1 and entriestoday < count Then Buy("첫번재바이1",atlimit,root1-n1); If MarketPosition == 0 and OK==1 and H <var1 + n2 and entriestoday < count Then Sell("첫번째셀1",AtLimit,root1+n2); If MarketPosition == 1 Then ExitLong("첫번째바이이익정리1",AtLimit,EntryPrice+nn1); If MarketPosition == 1 and L < EntryPrice-nn1 Then ExitLong("첫번째바이손실정리1",AtStop, EntryPrice-nn1); If MarketPosition == -1 Then ExitShort("첫번째셀이익1",atlimit,EntryPrice-nn2); If MarketPosition ==1 and H > EntryPrice+nn2 Then ExitShort("첫번째셀손실1",AtStop, EntryPrice+nn2 );