커뮤니티

하루에 한번만 거래하기~~

프로필 이미지
이형지
2019-04-02 04:06:48
167
글번호 127554
답변완료
아래식에서 하루에 1회만 거래되는 수식을 추가 시켜주시면 감사하겠습니다. Input : af(0.02), maxAF(0.2); input : starttime(150000),endtime(0); input : 장대양봉틱수(30),장대양봉후음봉틱수(5); input : 즉시수익청산(60),즉시손실청산(60); input : 봉완성수익청산(40),봉완성손실청산(40); input : 이평1(10),이평2(100); var : Tcond(false); var : cnt(0),mav1(0),mav2(0); mav1 = ma(C,이평1); mav2 = ma(C,이평2); var1 = Sar(af,maxAF); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } if Tcond == true then { if c >= O+PriceScale*장대양봉틱수 and mav1 > mav2 and c> var1 Then buy("b",atlimit,C-PriceScale*장대양봉후음봉틱수); } if MarketPosition == 1 Then { ExitLong("즉시수익",atlimit,EntryPrice+PriceScale*즉시수익청산); ExitLong("즉시손실",AtStop,EntryPrice-PriceScale*즉시손실청산); if C >= EntryPrice+PriceScale*봉완성수익청산 Then ExitLong("봉완성수익"); if C <= EntryPrice-PriceScale*봉완성손실청산 Then ExitLong("봉완성손실"); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2019-04-02 10:16:01

안녕하세요 예스스탁입니다. Input : af(0.02), maxAF(0.2); input : starttime(150000),endtime(0); input : 장대양봉틱수(30),장대양봉후음봉틱수(5); input : 즉시수익청산(60),즉시손실청산(60); input : 봉완성수익청산(40),봉완성손실청산(40); input : 이평1(10),이평2(100); var : Tcond(false),entry(0); var : cnt(0),mav1(0),mav2(0); mav1 = ma(C,이평1); mav2 = ma(C,이평2); var1 = Sar(af,maxAF); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; entry = 0; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then entry = entry+1; if Tcond == true then { if c >= O+PriceScale*장대양봉틱수 and mav1 > mav2 and c> var1 and entry < 1 Then buy("b",atlimit,C-PriceScale*장대양봉후음봉틱수); } if MarketPosition == 1 Then { ExitLong("즉시수익",atlimit,EntryPrice+PriceScale*즉시수익청산); ExitLong("즉시손실",AtStop,EntryPrice-PriceScale*즉시손실청산); if C >= EntryPrice+PriceScale*봉완성수익청산 Then ExitLong("봉완성수익"); if C <= EntryPrice-PriceScale*봉완성손실청산 Then ExitLong("봉완성손실"); } 즐거운 하루되세요 > 이형지 님이 쓴 글입니다. > 제목 : 하루에 한번만 거래하기~~ > 아래식에서 하루에 1회만 거래되는 수식을 추가 시켜주시면 감사하겠습니다. Input : af(0.02), maxAF(0.2); input : starttime(150000),endtime(0); input : 장대양봉틱수(30),장대양봉후음봉틱수(5); input : 즉시수익청산(60),즉시손실청산(60); input : 봉완성수익청산(40),봉완성손실청산(40); input : 이평1(10),이평2(100); var : Tcond(false); var : cnt(0),mav1(0),mav2(0); mav1 = ma(C,이평1); mav2 = ma(C,이평2); var1 = Sar(af,maxAF); if (sdate != sdate[1] and stime >= starttime) or (sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then { Tcond = true; } if (sdate != sdate[1] and stime >= endtime) or (sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then { Tcond = false; } if Tcond == true then { if c >= O+PriceScale*장대양봉틱수 and mav1 > mav2 and c> var1 Then buy("b",atlimit,C-PriceScale*장대양봉후음봉틱수); } if MarketPosition == 1 Then { ExitLong("즉시수익",atlimit,EntryPrice+PriceScale*즉시수익청산); ExitLong("즉시손실",AtStop,EntryPrice-PriceScale*즉시손실청산); if C >= EntryPrice+PriceScale*봉완성수익청산 Then ExitLong("봉완성수익"); if C <= EntryPrice-PriceScale*봉완성손실청산 Then ExitLong("봉완성손실"); }