커뮤니티

문의

프로필 이미지
좌오비우오비
2019-02-13 13:34:44
171
글번호 126126
답변완료
아래 수식을 보조차트(봉완성기준)를 이용할 수 있는 수식으로 수정바랍니다. 항상 고맙습니다 **************************************************************************************** input : 진입시간(090000); input : 당일최대진입횟수(1); input : up손절(50), dn손절(50); var : tcond(false); var : T1(0),entry(0); var : AA(0), BB(0), CC(0), DD(0), EE(0), FF(0); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; AA = dayhigh(1)-daylow(1); BB = dayhigh(2)-daylow(2); CC = dayhigh(3)-daylow(3); DD = dayhigh(4)-daylow(4); EE = dayhigh(5)-daylow(5); FF = dayhigh(6)-daylow(6); var1 = (AA+BB+CC+DD+EE+FF)/6; if entry < 당일최대진입횟수 and Tcond == true and crossup(C, dayopen() + var1*1.00) then buy(); if entry < 당일최대진입횟수 and Tcond == true and crossdown(C, dayopen() - var1*1.00) then sell(); if MarketPosition == 1 then { ExitLong("bl1",AtStop,EntryPrice-PriceScale*up손절); } if MarketPosition == -1 then { ExitShort("sl1",AtStop,EntryPrice+pricescale*dn손절); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-02-13 14:00:59

안녕하세요 예스스탁입니다. input : 진입시간(090000); input : 당일최대진입횟수(1); input : up손절(50), dn손절(50); var : tcond(false),T1(0,data1),entry(0,data1),D2(0,data1); var : AA(0,data2), BB(0,data2), CC(0,data2), DD(0,data2), EE(0,data2), FF(0,data2),v1(0,data2); D2 = data2(c); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; AA = data2(highd(1)-lowd(1)); BB = data2(highd(2)-lowd(2)); CC = data2(highd(3)-lowd(3)); DD = data2(highd(4)-lowd(4)); EE = data2(highd(5)-lowd(5)); FF = data2(highd(6)-lowd(6)); v1 = (AA+BB+CC+DD+EE+FF)/6; if entry < 당일최대진입횟수 and Tcond == true and data2(crossup(C, openD(0) + v1*1.00)) then buy("b"); if entry < 당일최대진입횟수 and Tcond == true and data2(crossdown(C, openD(0) - v1*1.00)) then sell("s"); if MarketPosition == 1 then { if data2(C) <= D2[BarsSinceEntry]-PriceScale*up손절 Then ExitLong("bl1"); } if MarketPosition == -1 then { if data2(c) >= D2[BarsSinceEntry]+PriceScale*dn손절 then ExitShort("sl1"); } 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식을 보조차트(봉완성기준)를 이용할 수 있는 수식으로 수정바랍니다. 항상 고맙습니다 **************************************************************************************** input : 진입시간(090000); input : 당일최대진입횟수(1); input : up손절(50), dn손절(50); var : tcond(false); var : T1(0),entry(0); var : AA(0), BB(0), CC(0), DD(0), EE(0), FF(0); if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; if bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; AA = dayhigh(1)-daylow(1); BB = dayhigh(2)-daylow(2); CC = dayhigh(3)-daylow(3); DD = dayhigh(4)-daylow(4); EE = dayhigh(5)-daylow(5); FF = dayhigh(6)-daylow(6); var1 = (AA+BB+CC+DD+EE+FF)/6; if entry < 당일최대진입횟수 and Tcond == true and crossup(C, dayopen() + var1*1.00) then buy(); if entry < 당일최대진입횟수 and Tcond == true and crossdown(C, dayopen() - var1*1.00) then sell(); if MarketPosition == 1 then { ExitLong("bl1",AtStop,EntryPrice-PriceScale*up손절); } if MarketPosition == -1 then { ExitShort("sl1",AtStop,EntryPrice+pricescale*dn손절); }