커뮤니티

부탁 합니다

프로필 이미지
마도로스77
2017-03-17 04:13:37
106
글번호 107909
답변완료

첨부 이미지

수고 하십니다 수식 검증좀 부탁 드려요 10시 부터 새벽 1시 사이에만 신호가 나오게 하고 싶은데 지금 수식은 다른시간에도 신호가 계속 나옵니다 초보라서 넘 힘드네요 ㅋ 잘못된 부분 정정좀 부탁 드립니다 input : sto1(10),sto2(5),sto3(2); var : loss(0),stok(0),stod(0); var : T1(0),entry(0),Tcond(false); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime == 220000 or (stime > 220000 and stime[1] < 220000) Then{ Tcond = true; T1 = TotalTrades; } if stime == 010000 or (stime > 010000 and stime[1] < 010000) Then Tcond = false; if Bdate != Bdate[1] Then Loss = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then loss = loss+1; if Tcond = true and loss < 2 and crossdown(stok,50) Then sell(); if MarketPosition == -1 then{ ExitShort("vv",atlimit,EntryPrice-PriceScale*50); if Lowest(L,BarsSinceEntry) <= EntryPrice-(PriceScale*55) Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); SetStopLoss(PriceScale*30,PointStop);//스탑로스30 }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-03-17 16:52:49

안녕하세요 예스스탁입니다. 매도진입식의 if조건이 잘못되어 있습니다. Tcond = true 현재 Tcond값이 true와 같다라고 지정되어야 합니다 Tcond == true 예스랭귀지에서 =는 저장, ==가 같다라는 표현입니다. input : sto1(10),sto2(5),sto3(2); var : loss(0),stok(0),stod(0); var : T1(0),entry(0),Tcond(false); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime == 220000 or (stime > 220000 and stime[1] < 220000) Then{ Tcond = true; T1 = TotalTrades; } if stime == 010000 or (stime > 010000 and stime[1] < 010000) Then Tcond = false; if Bdate != Bdate[1] Then Loss = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then loss = loss+1; if Tcond == true and loss < 2 and crossdown(stok,50) Then sell(); if MarketPosition == -1 then{ ExitShort("vv",atlimit,EntryPrice-PriceScale*50); if Lowest(L,BarsSinceEntry) <= EntryPrice-(PriceScale*55) Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); SetStopLoss(PriceScale*30,PointStop);//스탑로스30 } 즐거운 하루되세요 > 마도로스77 님이 쓴 글입니다. > 제목 : 부탁 합니다 > 수고 하십니다 수식 검증좀 부탁 드려요 10시 부터 새벽 1시 사이에만 신호가 나오게 하고 싶은데 지금 수식은 다른시간에도 신호가 계속 나옵니다 초보라서 넘 힘드네요 ㅋ 잘못된 부분 정정좀 부탁 드립니다 input : sto1(10),sto2(5),sto3(2); var : loss(0),stok(0),stod(0); var : T1(0),entry(0),Tcond(false); stok = StochasticsK(sto1,sto2); stod = StochasticsD(sto1,sto2,sto3); if stime == 220000 or (stime > 220000 and stime[1] < 220000) Then{ Tcond = true; T1 = TotalTrades; } if stime == 010000 or (stime > 010000 and stime[1] < 010000) Then Tcond = false; if Bdate != Bdate[1] Then Loss = 0; if TotalTrades > TotalTrades[1] and IsExitName("StopLoss",1) == true Then loss = loss+1; if Tcond = true and loss < 2 and crossdown(stok,50) Then sell(); if MarketPosition == -1 then{ ExitShort("vv",atlimit,EntryPrice-PriceScale*50); if Lowest(L,BarsSinceEntry) <= EntryPrice-(PriceScale*55) Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*10); SetStopLoss(PriceScale*30,PointStop);//스탑로스30 }