커뮤니티

문의드립니다

프로필 이미지
베드로
2015-09-25 13:11:29
126
글번호 90733
답변완료
안녕하세요. 해선 crude oil 종목에서 문의드립니다(yes Global차트 20분사용) 종목 운영시간은 17 - 16시 15분 입니다. 그런데 지난월물(10월)에서는 16시 15분에 봉이 있어는데 신규월물(11월)부터는 16시 까지만 봉이 생성되고 있읍니다.(11월물은 20일부터시작) 그러면 아래 식에서 시작시간및 청산시간을 어떻게 변경해야하나요?. 감사합니다 input : af1(0.01),max1(0.1); input : S1(20),P1(53); var : para1(0),T1(0); var : Bcond1(false); var : Scond1(false); var : pre(0),daycnt(0); para1 = sar(af1,max1); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then pre = TotalTrades; if MarketPosition == 0 Then daycnt = TotalTrades-Pre; Else daycnt = (TotalTrades-Pre)+1; if stime >= 170000 or stime < 160000 Then{ if crossup(C,para1) Then{ Bcond1 = false; var1 = H; var2 = L; T1 = 1; } if CrossDown(C,para1) Then{ Scond1 = false; var1 = H; var2 = L; T1 = -1; } if T1 == 1 and T1[1] == 1 and Bcond1 == false and H >= var1[1]+PriceScale*1 Then Bcond1 = true; if T1 == -1 and T1[1] == -1 and Scond1 == false and L <= var2[1]-PriceScale*1 Then Scond1 = true; if T1 == 1 and Bcond1 == false Then buy("B1",AtStop,var1+PriceScale*1); if T1 == -1 and Scond1 == false Then sell("S1",AtStop,var2-PriceScale*1); if daycnt == 0 and crossup(c,var1) and c > para1 Then buy("B2"); if daycnt == 0 and CrossDown(c,var2) and c < para1 Then sell("S2"); } =========================================================== 생략 =========================================================== if MarketPosition == 1 then{ if CrossDown(c,para1) Then exitlong("bx1"); } if MarketPosition == -1 then{ if crossup(c,para1) Then ExitShort("sx1"); } if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{ exitlong("bexit"); ExitShort("sexit"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-09-25 14:22:30

안녕하세요 예스스탁입니다. 시작시간은 변경하실 부분이 없습니다. 당일청산시간을 기존 16시에서 한봉 전인 15시 45으로 지정해 주시고 17~다음날 15시 45분 전까지만 진입청산되게 하시면 됩니다. input : af1(0.01),max1(0.1); input : S1(20),P1(53); var : para1(0),T1(0); var : Bcond1(false); var : Scond1(false); var : pre(0),daycnt(0); para1 = sar(af1,max1); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then pre = TotalTrades; if MarketPosition == 0 Then daycnt = TotalTrades-Pre; Else daycnt = (TotalTrades-Pre)+1; if stime >= 170000 or stime < 154500 Then{ if crossup(C,para1) Then{ Bcond1 = false; var1 = H; var2 = L; T1 = 1; } if CrossDown(C,para1) Then{ Scond1 = false; var1 = H; var2 = L; T1 = -1; } if T1 == 1 and T1[1] == 1 and Bcond1 == false and H >= var1[1]+PriceScale*1 Then Bcond1 = true; if T1 == -1 and T1[1] == -1 and Scond1 == false and L <= var2[1]-PriceScale*1 Then Scond1 = true; if T1 == 1 and Bcond1 == false Then buy("B1",AtStop,var1+PriceScale*1); if T1 == -1 and Scond1 == false Then sell("S1",AtStop,var2-PriceScale*1); if daycnt == 0 and crossup(c,var1) and c > para1 Then buy("B2"); if daycnt == 0 and CrossDown(c,var2) and c < para1 Then sell("S2"); } #=========================================================== #생략 #=========================================================== if MarketPosition == 1 then{ if CrossDown(c,para1) Then exitlong("bx1"); } if MarketPosition == -1 then{ if crossup(c,para1) Then ExitShort("sx1"); } if stime == 154500 or (stime > 154500 and stime[1] < 154500) Then{ exitlong("bexit"); ExitShort("sexit"); } 즐거운 한가위 되시기 바랍니다. > 베드로 님이 쓴 글입니다. > 제목 : 문의드립니다 > 안녕하세요. 해선 crude oil 종목에서 문의드립니다(yes Global차트 20분사용) 종목 운영시간은 17 - 16시 15분 입니다. 그런데 지난월물(10월)에서는 16시 15분에 봉이 있어는데 신규월물(11월)부터는 16시 까지만 봉이 생성되고 있읍니다.(11월물은 20일부터시작) 그러면 아래 식에서 시작시간및 청산시간을 어떻게 변경해야하나요?. 감사합니다 input : af1(0.01),max1(0.1); input : S1(20),P1(53); var : para1(0),T1(0); var : Bcond1(false); var : Scond1(false); var : pre(0),daycnt(0); para1 = sar(af1,max1); if stime == 170000 or (stime > 170000 and stime[1] < 170000) Then pre = TotalTrades; if MarketPosition == 0 Then daycnt = TotalTrades-Pre; Else daycnt = (TotalTrades-Pre)+1; if stime >= 170000 or stime < 160000 Then{ if crossup(C,para1) Then{ Bcond1 = false; var1 = H; var2 = L; T1 = 1; } if CrossDown(C,para1) Then{ Scond1 = false; var1 = H; var2 = L; T1 = -1; } if T1 == 1 and T1[1] == 1 and Bcond1 == false and H >= var1[1]+PriceScale*1 Then Bcond1 = true; if T1 == -1 and T1[1] == -1 and Scond1 == false and L <= var2[1]-PriceScale*1 Then Scond1 = true; if T1 == 1 and Bcond1 == false Then buy("B1",AtStop,var1+PriceScale*1); if T1 == -1 and Scond1 == false Then sell("S1",AtStop,var2-PriceScale*1); if daycnt == 0 and crossup(c,var1) and c > para1 Then buy("B2"); if daycnt == 0 and CrossDown(c,var2) and c < para1 Then sell("S2"); } =========================================================== 생략 =========================================================== if MarketPosition == 1 then{ if CrossDown(c,para1) Then exitlong("bx1"); } if MarketPosition == -1 then{ if crossup(c,para1) Then ExitShort("sx1"); } if stime == 160000 or (stime > 160000 and stime[1] < 160000) Then{ exitlong("bexit"); ExitShort("sexit"); }