커뮤니티

59258 추가질문입니다

프로필 이미지
초짜79
2018-09-11 19:00:25
128
글번호 121968
답변완료
신호가 중복되서 당일고점,시가 등등 이런거 없애고 거래량만 추가 하려면 아래수식으로 하면 될까요? Var : p1(20),p2(150); Var : sto1(20),sto2(5),sto3(5); var : ma1(0),ma2(0),stok(0),stod(0); ma1 = ma(C,P1); ma2 = ma(C,P2); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); condition1 = ma1 > ma2 and stok > stod and v >= 4000;--------------> 요기만 추가 condition2 = ma1 < ma2 and stok < stod and v <= 4000;--------------> 요기만 추가 if stime >= 100000 or stime <050000 then { if condition1 == true and condition1[1] == false then { if MarketPosition == 0 or (MarketPosition == -1 and (C > dayopen or C >= EntryPrice+PriceScale*20)) then buy("매수",OnClose,def,3); } if condition2 == true and condition2[1] == false then { if MarketPosition == 0 or (MarketPosition == 1 and (C < dayopen or C <= EntryPrice-PriceScale*20)) then sell("매도",OnClose,def,3); } if MarketPosition == 1 then { ExitLong("bp1",atlimit,EntryPrice+PriceScale*20,"",1,1); ExitLong("bp2",atlimit,EntryPrice+PriceScale*40,"",1,1); ExitLong("bp3",atlimit,EntryPrice+PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitLong("bl1",AtStop,EntryPrice-PriceScale*20); else ExitLong("bl2",AtStop,EntryPrice+PriceScale*5); } if MarketPosition == -1 then { ExitShort("sp1",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sp2",atlimit,EntryPrice-PriceScale*40,"",1,1); ExitShort("sp3",atlimit,EntryPrice-PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("sl1",AtStop,EntryPrice+PriceScale*20); else ExitShort("sl2",AtStop,EntryPrice-PriceScale*5); } if stime == 050000 then { exitlong(); exitshort(); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-09-12 11:48:15

안녕하세요 예스스탁입니다. 문의하신 내용을 정확히 이해하지 못했습니다. 수식에는 당일고점등이 사용된 내용이 없습니다. 기존수식에 매수진입후 매도로 스위칭할때 당일시가 이상이거나 종가가 진입가대비 20틱이상일때만 스위칭되고 매도진입후 매수로 스위칭할때 당일시가 이하이거나 종가가 진입가대비 20틱이하일때만 스위칭되게 되어 있습니다. 해당 내용을 제거해 드립니다. Var : p1(20),p2(150); Var : sto1(20),sto2(5),sto3(5); var : ma1(0),ma2(0),stok(0),stod(0); ma1 = ma(C,P1); ma2 = ma(C,P2); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); condition1 = ma1 > ma2 and stok > stod and v >= 4000; condition2 = ma1 < ma2 and stok < stod and v <= 4000; if stime >= 100000 or stime <050000 then { if condition1 == true and condition1[1] == false then { buy("매수",OnClose,def,3); } if condition2 == true and condition2[1] == false then { sell("매도",OnClose,def,3); } } if MarketPosition == 1 then { ExitLong("bp1",atlimit,EntryPrice+PriceScale*20,"",1,1); ExitLong("bp2",atlimit,EntryPrice+PriceScale*40,"",1,1); ExitLong("bp3",atlimit,EntryPrice+PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitLong("bl1",AtStop,EntryPrice-PriceScale*20); else ExitLong("bl2",AtStop,EntryPrice+PriceScale*5); } if MarketPosition == -1 then { ExitShort("sp1",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sp2",atlimit,EntryPrice-PriceScale*40,"",1,1); ExitShort("sp3",atlimit,EntryPrice-PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("sl1",AtStop,EntryPrice+PriceScale*20); else ExitShort("sl2",AtStop,EntryPrice-PriceScale*5); } if stime == 050000 then { exitlong(); exitshort(); } 즐거운 하루되세요 > 초짜79 님이 쓴 글입니다. > 제목 : 59258 추가질문입니다 > 신호가 중복되서 당일고점,시가 등등 이런거 없애고 거래량만 추가 하려면 아래수식으로 하면 될까요? Var : p1(20),p2(150); Var : sto1(20),sto2(5),sto3(5); var : ma1(0),ma2(0),stok(0),stod(0); ma1 = ma(C,P1); ma2 = ma(C,P2); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); condition1 = ma1 > ma2 and stok > stod and v >= 4000;--------------> 요기만 추가 condition2 = ma1 < ma2 and stok < stod and v <= 4000;--------------> 요기만 추가 if stime >= 100000 or stime <050000 then { if condition1 == true and condition1[1] == false then { if MarketPosition == 0 or (MarketPosition == -1 and (C > dayopen or C >= EntryPrice+PriceScale*20)) then buy("매수",OnClose,def,3); } if condition2 == true and condition2[1] == false then { if MarketPosition == 0 or (MarketPosition == 1 and (C < dayopen or C <= EntryPrice-PriceScale*20)) then sell("매도",OnClose,def,3); } if MarketPosition == 1 then { ExitLong("bp1",atlimit,EntryPrice+PriceScale*20,"",1,1); ExitLong("bp2",atlimit,EntryPrice+PriceScale*40,"",1,1); ExitLong("bp3",atlimit,EntryPrice+PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitLong("bl1",AtStop,EntryPrice-PriceScale*20); else ExitLong("bl2",AtStop,EntryPrice+PriceScale*5); } if MarketPosition == -1 then { ExitShort("sp1",atlimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sp2",atlimit,EntryPrice-PriceScale*40,"",1,1); ExitShort("sp3",atlimit,EntryPrice-PriceScale*60,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("sl1",AtStop,EntryPrice+PriceScale*20); else ExitShort("sl2",AtStop,EntryPrice-PriceScale*5); } if stime == 050000 then { exitlong(); exitshort(); }