커뮤니티

수식추가

프로필 이미지
목마와숙녀
2018-05-14 11:30:21
190
글번호 118865
답변완료
buy와 sell 두가지 수식이 있으며, 아래 내용을 input과 var에 추가하고 싶습니다. 1. 진입시간 : 입력시 장시작으로 인식 2. 진입제한시간 3. 트레이드 종료시간 4. 손절 5. 익절 6. trailing stop 다른 전략에도 참조하여 사용할 수 있는 수식으로 부탁드립니다. *********************************************************************************** 1. buy 수식 Inputs: DMILen(14), Consec(3), MinDiff(0); Variables: DMIDiff(0); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] > 0 Then Begin If DMIDiff >= MinDiff AND CountIF(DMIDiff > DMIDiff[1], Consec) == Consec Then Buy ("DMI"); End; 2. sell 수식 Inputs: DMILen(14), Consec(3), MinDiff(0); Variables: DMIDiff(0); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] < 0 Then Begin If Abs(DMIDiff) >= MinDiff AND CountIF(DMIDiff < DMIDiff[1], Consec) == Consec Then Sell ("DMI"); End;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-05-14 15:54:24

안녕하세요 예스스탁입니다. 익절,손절,최대수익대비하락은 설정기준이 %인지 pt인지 틱인지에 따라 수식이 다릅니다. 해당 내용은 시스템 적용시 강제청산탭에서 설정하실수 있으므로 강제청산탭에서 설정하시면 됩니다 수식에서 하는것과 설정창이 동일합니다. 시간조건들만 추가해 드립니다. 1 input : 진입시간(100000),진입제한시간(120000),트레이드종료시간(150000); Inputs: DMILen(14), Consec(3), MinDiff(0); Var : DMIDiff(0); var : Tcond(false); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 트레이드종료시간) or (sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then exitlong(); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] > 0 and Tcond == true Then Begin If DMIDiff >= MinDiff AND CountIF(DMIDiff > DMIDiff[1], Consec) == Consec Then Buy ("DMI"); End; 2 input : 진입시간(100000),진입제한시간(120000),트레이드종료시간(150000); Inputs: DMILen(14), Consec(3), MinDiff(0); Var : DMIDiff(0); var : Tcond(false); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if (sdate != sdate[1] and stime >= 진입제한시간) or (sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then Tcond = false; if (sdate != sdate[1] and stime >= 트레이드종료시간) or (sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then exitlong(); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] < 0 Then Begin If Abs(DMIDiff) >= MinDiff AND CountIF(DMIDiff < DMIDiff[1], Consec) == Consec Then Sell ("DMI"); End; 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 수식추가 > buy와 sell 두가지 수식이 있으며, 아래 내용을 input과 var에 추가하고 싶습니다. 1. 진입시간 : 입력시 장시작으로 인식 2. 진입제한시간 3. 트레이드 종료시간 4. 손절 5. 익절 6. trailing stop 다른 전략에도 참조하여 사용할 수 있는 수식으로 부탁드립니다. *********************************************************************************** 1. buy 수식 Inputs: DMILen(14), Consec(3), MinDiff(0); Variables: DMIDiff(0); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] > 0 Then Begin If DMIDiff >= MinDiff AND CountIF(DMIDiff > DMIDiff[1], Consec) == Consec Then Buy ("DMI"); End; 2. sell 수식 Inputs: DMILen(14), Consec(3), MinDiff(0); Variables: DMIDiff(0); DMIDiff = DIPlus(DMILen) - DIMinus(DMILen); If DMIDiff[Consec] < 0 Then Begin If Abs(DMIDiff) >= MinDiff AND CountIF(DMIDiff < DMIDiff[1], Consec) == Consec Then Sell ("DMI"); End;