커뮤니티

안녕하세요

프로필 이미지
수원
2018-04-22 20:09:00
147
글번호 118387
답변완료
아래식에서 당일저가와 현재가 차이가 +200틱이상이면 매수진입금지 당일고가와 현재가 차이가 -200틱이상이면 매도진입금지 입니다만 이조건을 당일시가와 현재가 차이가 +200틱이상이면 매수진입금지 당일시가와 현재가 차이가 -200틱이상이면 매도진입금지 로 변경식 부탁드립니다 Input : shortPeriod(100), longPeriod(200); Input : 당일손실틱수(800),당일수익틱수(800); var : DH(0),DL(0); var : HH(0),LL(0),T1(0),entry(0); var : cnt(0),count(0),dayPl(0),당일손실(0),당일수익(0); var : Xcond(false),N1(0); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) Then{ Condition1 = true; DH = H; DL = L; Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; if Condition1 == true then{ if H > DH Then DH = H; if L < DL Then DL = L; } if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then { HH = H; LL = L; T1 = TotalTrades; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if stime >= 104500 and stime < 114500 then{ if H > HH Then HH = H; if L < LL Then LL = L; if HH >= LL+PriceScale*10 and entry < 20000 and Xcond == false then { if DL > 0 and C < DL+PriceScale*200 and crossup(value1,value2) Then buy(); if DH > 0 and C > DH-PriceScale*200 and CrossDown(value1,value2) Then sell(); } } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*60,PointStop); if MarketPosition == 1 Then{ HH = highest(H,BarsSinceEntry); if HH >= EntryPrice+PriceScale*39 and HH < EntryPrice+PriceScale*44 Then ExitLong("수청0",AtStop,EntryPrice+PriceScale*10); if HH >= EntryPrice+PriceScale*50 and HH < EntryPrice+PriceScale*55 Then ExitLong("수청1",AtStop,EntryPrice+PriceScale*20); if HH >= EntryPrice+PriceScale*44 and HH < EntryPrice+PriceScale*50 Then ExitLong("수청2",AtStop,EntryPrice+PriceScale*15); if HH >= EntryPrice+PriceScale*55 and HH < EntryPrice+PriceScale*60 Then ExitLong("수청3",AtStop,EntryPrice+PriceScale*30); } if MarketPosition == -1 Then{ LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*39 and LL > EntryPrice-PriceScale*44 Then Exitshort("도청0",AtStop,EntryPrice-PriceScale*6); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*50 and LL > EntryPrice-PriceScale*55 Then Exitshort("도청1",AtStop,EntryPrice-PriceScale*20); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*44 and LL > EntryPrice-PriceScale*50 Then Exitshort("도청2",AtStop,EntryPrice-PriceScale* 15); if LL <= EntryPrice-PriceScale*55 and LL > EntryPrice-PriceScale*90 Then Exitshort("도청3",AtStop,EntryPrice-PriceScale* 30); } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-04-24 15:26:57

안녕하세요 예스스탁입니다. Input : shortPeriod(100), longPeriod(200); Input : 당일손실틱수(800),당일수익틱수(800); var : DO(0),DH(0),DL(0); var : HH(0),LL(0),T1(0),entry(0); var : cnt(0),count(0),dayPl(0),당일손실(0),당일수익(0); var : Xcond(false),N1(0); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) Then{ Condition1 = true; DO = O; DH = H; DL = L; Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; if Condition1 == true then{ if H > DH Then DH = H; if L < DL Then DL = L; } if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then { HH = H; LL = L; T1 = TotalTrades; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if stime >= 104500 and stime < 114500 then{ if H > HH Then HH = H; if L < LL Then LL = L; if HH >= LL+PriceScale*10 and entry < 20000 and Xcond == false then { if DL > 0 and C < DO+PriceScale*200 and crossup(value1,value2) Then buy(); if DH > 0 and C > DO-PriceScale*200 and CrossDown(value1,value2) Then sell(); } } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*60,PointStop); if MarketPosition == 1 Then{ HH = highest(H,BarsSinceEntry); if HH >= EntryPrice+PriceScale*39 and HH < EntryPrice+PriceScale*44 Then ExitLong("수청0",AtStop,EntryPrice+PriceScale*10); if HH >= EntryPrice+PriceScale*50 and HH < EntryPrice+PriceScale*55 Then ExitLong("수청1",AtStop,EntryPrice+PriceScale*20); if HH >= EntryPrice+PriceScale*44 and HH < EntryPrice+PriceScale*50 Then ExitLong("수청2",AtStop,EntryPrice+PriceScale*15); if HH >= EntryPrice+PriceScale*55 and HH < EntryPrice+PriceScale*60 Then ExitLong("수청3",AtStop,EntryPrice+PriceScale*30); } if MarketPosition == -1 Then{ LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*39 and LL > EntryPrice-PriceScale*44 Then Exitshort("도청0",AtStop,EntryPrice-PriceScale*6); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*50 and LL > EntryPrice-PriceScale*55 Then Exitshort("도청1",AtStop,EntryPrice-PriceScale*20); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*44 and LL > EntryPrice-PriceScale*50 Then Exitshort("도청2",AtStop,EntryPrice-PriceScale* 15); if LL <= EntryPrice-PriceScale*55 and LL > EntryPrice-PriceScale*90 Then Exitshort("도청3",AtStop,EntryPrice-PriceScale* 30); } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } 즐거운 하루되세요 > 수원 님이 쓴 글입니다. > 제목 : 안녕하세요 > 아래식에서 당일저가와 현재가 차이가 +200틱이상이면 매수진입금지 당일고가와 현재가 차이가 -200틱이상이면 매도진입금지 입니다만 이조건을 당일시가와 현재가 차이가 +200틱이상이면 매수진입금지 당일시가와 현재가 차이가 -200틱이상이면 매도진입금지 로 변경식 부탁드립니다 Input : shortPeriod(100), longPeriod(200); Input : 당일손실틱수(800),당일수익틱수(800); var : DH(0),DL(0); var : HH(0),LL(0),T1(0),entry(0); var : cnt(0),count(0),dayPl(0),당일손실(0),당일수익(0); var : Xcond(false),N1(0); 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; value1 = ma(C, shortPeriod); value2 = ma(C, longPeriod); if (sdate != sdate[1] and stime >= 100000) or (sdate == sdate[1] and stime >= 100000 and stime[1] < 100000) Then{ Condition1 = true; DH = H; DL = L; Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] and (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; if Condition1 == true then{ if H > DH Then DH = H; if L < DL Then DL = L; } if stime == 101500 or (stime > 101500 and stime[1] < 101500) Then { HH = H; LL = L; T1 = TotalTrades; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if stime >= 104500 and stime < 114500 then{ if H > HH Then HH = H; if L < LL Then LL = L; if HH >= LL+PriceScale*10 and entry < 20000 and Xcond == false then { if DL > 0 and C < DL+PriceScale*200 and crossup(value1,value2) Then buy(); if DH > 0 and C > DH-PriceScale*200 and CrossDown(value1,value2) Then sell(); } } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*60,PointStop); if MarketPosition == 1 Then{ HH = highest(H,BarsSinceEntry); if HH >= EntryPrice+PriceScale*39 and HH < EntryPrice+PriceScale*44 Then ExitLong("수청0",AtStop,EntryPrice+PriceScale*10); if HH >= EntryPrice+PriceScale*50 and HH < EntryPrice+PriceScale*55 Then ExitLong("수청1",AtStop,EntryPrice+PriceScale*20); if HH >= EntryPrice+PriceScale*44 and HH < EntryPrice+PriceScale*50 Then ExitLong("수청2",AtStop,EntryPrice+PriceScale*15); if HH >= EntryPrice+PriceScale*55 and HH < EntryPrice+PriceScale*60 Then ExitLong("수청3",AtStop,EntryPrice+PriceScale*30); } if MarketPosition == -1 Then{ LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*39 and LL > EntryPrice-PriceScale*44 Then Exitshort("도청0",AtStop,EntryPrice-PriceScale*6); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*50 and LL > EntryPrice-PriceScale*55 Then Exitshort("도청1",AtStop,EntryPrice-PriceScale*20); LL = lowest(L,BarsSinceEntry); if LL <= EntryPrice-PriceScale*44 and LL > EntryPrice-PriceScale*50 Then Exitshort("도청2",AtStop,EntryPrice-PriceScale* 15); if LL <= EntryPrice-PriceScale*55 and LL > EntryPrice-PriceScale*90 Then Exitshort("도청3",AtStop,EntryPrice-PriceScale* 30); } if MarketPosition == 1 then{ ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then{ ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); }