커뮤니티

수식질문입니당~

프로필 이미지
초짜79
2018-09-08 23:27:16
176
글번호 121901
답변완료
1.아래수식에 추가로 내용을 넣고싶습니다! 아래 조건에 거래량이 4000이상이고 당일 고점을 상향돌파할때와,당일고점저점의 중심값을 상향돌파할때 매수신호가 나오고 당일저점을 하향돌파할때와,당일고점저점의 중심값을 하향돌파할때 매도신호가 나오게 해주세용! 감사합니다!(예를들어 모든조건을 갖춘 상태에서 당일고점저점의 중심값을 상향돌파할때 매수 신호가 나오면 매수신호가 유지되니 그 상태로 만약 당일 고점 돌파할때는 매수신호가 안나오겠죠? 또 매수신호가 유지되는 상황에서 조건이 전부 갖춰지지않은 상태인데 일시적으로 당일고점저점의 중심값을 하향돌파했다고 매도신호가 나오지 않았으면 좋겠습니다 반대 매도신호도 지금과 같은 상태로 해주시면 감사하겠습니다) 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; condition2 = ma1 < ma2 and stok < stod; 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(); } 2. 추가로 지표문의입니다 당일 시가 기준으로 위 아래로 피보나치 라인이 생기게 지표생기게 부탁합니다.시간은 해선이라 07시부터 다음날 06시 입니다 위로 (23.6)(38.2)(50.0)(61.8)(76.4)(100) 아래로 (23.6)(38.2)(50.0)(61.8)(76.4)(100) 라인이 생기게 해주세용 감사합니다!
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2018-09-10 11:00:15

안녕하세요 예스스탁입니다. 1 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); var1 = (DayHigh+daylow)/2; condition1 = ma1 > ma2 and stok > stod; condition2 = ma1 < ma2 and stok < stod; 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 v >= 4000 and bdate == bdate[1] and (C > DayHigh(0)[1] or crossup(c,var1)) Then buy("매수1"); if v >= 4000 and bdate == bdate[1] and (C < DayLow(0)[1] or CrossDown(c,var1)) Then sell("매도1"); } 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(); } 2 input : Per1(23.6),Per2(38.2),Per3(50.0),Per4(61.8),Per5(76.4),Per6(100.0); var1 = DayHigh-DayLow; plot1(dayopen); plot2(DayOpen+var1*(Per1/100)); plot3(DayOpen+var1*(Per2/100)); plot4(DayOpen+var1*(Per3/100)); plot5(DayOpen+var1*(Per4/100)); plot6(DayOpen+var1*(Per5/100)); plot7(DayOpen+var1*(Per6/100)); plot8(DayOpen-var1*(Per1/100)); plot9(DayOpen-var1*(Per2/100)); plot10(DayOpen-var1*(Per3/100)); plot11(DayOpen-var1*(Per4/100)); plot12(DayOpen-var1*(Per5/100)); plot13(DayOpen-var1*(Per6/100)); 즐거운 하루되세요 > 초짜79 님이 쓴 글입니다. > 제목 : 수식질문입니당~ > 1.아래수식에 추가로 내용을 넣고싶습니다! 아래 조건에 거래량이 4000이상이고 당일 고점을 상향돌파할때와,당일고점저점의 중심값을 상향돌파할때 매수신호가 나오고 당일저점을 하향돌파할때와,당일고점저점의 중심값을 하향돌파할때 매도신호가 나오게 해주세용! 감사합니다!(예를들어 모든조건을 갖춘 상태에서 당일고점저점의 중심값을 상향돌파할때 매수 신호가 나오면 매수신호가 유지되니 그 상태로 만약 당일 고점 돌파할때는 매수신호가 안나오겠죠? 또 매수신호가 유지되는 상황에서 조건이 전부 갖춰지지않은 상태인데 일시적으로 당일고점저점의 중심값을 하향돌파했다고 매도신호가 나오지 않았으면 좋겠습니다 반대 매도신호도 지금과 같은 상태로 해주시면 감사하겠습니다) 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; condition2 = ma1 < ma2 and stok < stod; 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(); } 2. 추가로 지표문의입니다 당일 시가 기준으로 위 아래로 피보나치 라인이 생기게 지표생기게 부탁합니다.시간은 해선이라 07시부터 다음날 06시 입니다 위로 (23.6)(38.2)(50.0)(61.8)(76.4)(100) 아래로 (23.6)(38.2)(50.0)(61.8)(76.4)(100) 라인이 생기게 해주세용 감사합니다!
프로필 이미지

초짜79

2018-09-10 15:54:55

신호가 중복되서 당일고점,시가 등등 이런거 없애고 거래량만 추가 하려면 아래수식으로 하면 될까요? 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(); }