커뮤니티

문의 드립니다.~~~~

프로필 이미지
예스요
2022-11-13 16:26:59
893
글번호 163754
답변완료
CNE 거래시 아래식에서 매매시작시간과 종료시간을 설정하고 싶은데 도움 바랍니다. input&#160;:&#160;N(10); if&#160;NextBarSdate&#160;!=&#160;sDate&#160;Then { &#160;&#160;&#160;&#160;&#160;&#160;Buy("b1",AtStop,NextBarOpen+PriceScale*n); &#160;&#160;&#160;&#160;&#160;&#160;Sell("s1",AtStop,NextBarOpen-PriceScale*n); } Else { &#160;&#160;&#160;&#160;&#160;&#160;if&#160;MarketPosition&#160;<=&#160;0&#160;or&#160;(MarketPosition&#160;==&#160;1&#160;and&#160;MaxEntries&#160;<&#160;3&#160;and&#160;h&#160;<&#160;DayOpen+PriceScale*10)&#160;Then &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Buy("b2",AtStop,DayOpen+PriceScale*n); &#160;&#160;&#160;&#160;&#160;&#160;if&#160;MarketPosition&#160;>=&#160;0&#160;or&#160;(MarketPosition&#160;==&#160;-1&#160;and&#160;MaxEntries&#160;<&#160;3&#160;and&#160;L&#160;>&#160;DayOpen-PriceScale*10)&#160;Then &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Sell("s2",AtStop,DayOpen-PriceScale*n); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-11-15 11:06:20

안녕하세요 예스스탁입니다. input : N(10); input : StartTime(80000),EndTime(65000); var : Tcond(false); IF Endtime > starttime Then SetStopEndofday(Endtime); Else { if sDate != sDate[1] Then SetStopEndofday(Endtime); } if (NextBarSdate != sdate and NextBarStime >= EndTime) or (NextBarSdate == sdate and NextBarStime >= EndTime and stime < EndTime) Then Tcond = False; if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Tcond = true; IF Endtime <= starttime Then { SetStopEndofday(0); } } if (NextBarSdate != sdate and NextBarStime >= StartTime) or (NextBarSdate == sdate and NextBarStime >= StartTime and stime < StartTime) Then { Buy("b1",AtStop,NextBarOpen+PriceScale*n); Sell("s1",AtStop,NextBarOpen-PriceScale*n); } Else { if Tcond == true Then { if MarketPosition <= 0 or (MarketPosition == 1 and MaxEntries < 3 and h < DayOpen+PriceScale*10) Then Buy("b2",AtStop,DayOpen+PriceScale*n); if MarketPosition >= 0 or (MarketPosition == -1 and MaxEntries < 3 and L > DayOpen-PriceScale*10) Then Sell("s2",AtStop,DayOpen-PriceScale*n); } } 즐거운 하루되세요 > 예스요 님이 쓴 글입니다. > 제목 : 문의 드립니다.~~~~ > CNE 거래시 아래식에서 매매시작시간과 종료시간을 설정하고 싶은데 도움 바랍니다. input&#160;:&#160;N(10); if&#160;NextBarSdate&#160;!=&#160;sDate&#160;Then { &#160;&#160;&#160;&#160;&#160;&#160;Buy("b1",AtStop,NextBarOpen+PriceScale*n); &#160;&#160;&#160;&#160;&#160;&#160;Sell("s1",AtStop,NextBarOpen-PriceScale*n); } Else { &#160;&#160;&#160;&#160;&#160;&#160;if&#160;MarketPosition&#160;<=&#160;0&#160;or&#160;(MarketPosition&#160;==&#160;1&#160;and&#160;MaxEntries&#160;<&#160;3&#160;and&#160;h&#160;<&#160;DayOpen+PriceScale*10)&#160;Then &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Buy("b2",AtStop,DayOpen+PriceScale*n); &#160;&#160;&#160;&#160;&#160;&#160;if&#160;MarketPosition&#160;>=&#160;0&#160;or&#160;(MarketPosition&#160;==&#160;-1&#160;and&#160;MaxEntries&#160;<&#160;3&#160;and&#160;L&#160;>&#160;DayOpen-PriceScale*10)&#160;Then &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Sell("s2",AtStop,DayOpen-PriceScale*n); }