커뮤니티

문의드립니다

프로필 이미지
cjfdk
2024-09-19 12:11:26
718
글번호 183498
답변완료
input : tenkan_len(9),tenkan_mult(2),kijun_len(26),kijun_mult(4),spanB_len(52),spanB_mult(6),offset(26); Input : 당일수익틱수(100),당일손실틱수(200); Var : N1(0),dayPl(0),당일수익(0),당일손실(0); var : Xcond(false); var : ATR1(0),up1(0),dn1(0),upper1(0),lower1(0),os1(0),spt1(0),max1(0),min1(0),tenkan(0); var : ATR2(0),up2(0),dn2(0),upper2(0),lower2(0),os2(0),spt2(0),max2(0),min2(0),kijun(0); var : senkouA(0); var : ATR3(0),up3(0),dn3(0),upper3(0),lower3(0),os3(0),spt3(0),max3(0),min3(0),senkouB(0); var : tenkan_css(0),kijun_css(0),cloud_a(0),cloud_b(0),chikou_css(0),tx(0); ATR1 = ATR(tenkan_len)*tenkan_mult; up1 = (h+L)/2 + ATR1; dn1 = (h+L)/2 - ATR1; upper1 = iff(C[1] < upper1[1],min(up1,upper1[1]),up1); lower1 = iff(C[1] > lower1[1],max(dn1,lower1[1]),dn1); os1 = iff(c > upper1 , 1 ,IFf(c < lower1, 0 , os1[1])); spt1 = iff(os1 == 1 , lower1 , upper1); max1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , max(c,max1[1]) , IFf(os1 == 1 , max(c,max1[1]) , spt1)); min1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , min(c,min1[1]) , iff(os1 == 0 , min(c,min1[1]) , spt1)); tenkan = avg(max1,min1); ATR2 = ATR(kijun_len)*kijun_mult; up2 = (h+L)/2 + ATR2; dn2 = (h+L)/2 - ATR2; upper2 = iff(C[1] < upper2[1],min(up2,upper2[1]),up2); lower2 = iff(C[1] > lower2[1],max(dn2,lower2[1]),dn2); os2 = iff(c > upper2 , 1 ,IFf(c < lower2, 0 , os2[1])); spt2 = iff(os2 == 1 , lower2 , upper2); max2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , max(c,max2[1]) , IFf(os2 == 1 , max(c,max2[1]) , spt2)); min2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , min(c,min2[1]) , iff(os2 == 0 , min(c,min2[1]) , spt2)); kijun = avg(max2,min2); senkouA = avg(kijun,tenkan); ATR3 = ATR(spanB_len)*spanB_mult; up3 = (h+L)/2 + ATR3; dn3 = (h+L)/2 - ATR3; upper3 = iff(C[1] < upper3[1],min(up3,upper3[1]),up3); lower3 = iff(C[1] > lower3[1],max(dn3,lower3[1]),dn3); os3 = iff(c > upper3 , 1 ,IFf(c < lower3, 0 , os3[1])); spt3 = iff(os3 == 1 , lower3 , upper3); max3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , max(c,max3[1]) , IFf(os3 == 1 , max(c,max3[1]) , spt3)); min3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , min(c,min3[1]) , iff(os3 == 0 , min(c,min3[1]) , spt3)); senkouB = avg(max3,min3); tenkan_css = Red; kijun_css = Blue; cloud_a = teal; cloud_b = red; chikou_css = Green; 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if Bdate != Bdate[1] Then { Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; } if Xcond == false Then { if CrossUp(tenkan,kijun) Then { Buy(); } if CrossDown(tenkan,kijun) Then { sell(); } } 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)); } 수고많으십니다 얼마전 만들어주신 수식인데 한가지 더 추가 부탁드리겠습니다 매수 신호인 경우 Kijun-Sen이 직전봉보다 내려가면 진입금지 매도 청산 매도 신호인 경우 Kijun-Sen이 직전봉보다 올라가면 진입금지 매수 청산 이수식을 추가하고싶어 도움 부탁드립니다 감사합니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-09-20 11:57:09

안녕하세요 예스스탁입니다. input : tenkan_len(9),tenkan_mult(2),kijun_len(26),kijun_mult(4),spanB_len(52),spanB_mult(6),offset(26); Input : 당일수익틱수(100),당일손실틱수(200); Var : N1(0),dayPl(0),당일수익(0),당일손실(0); var : Xcond(false); var : ATR1(0),up1(0),dn1(0),upper1(0),lower1(0),os1(0),spt1(0),max1(0),min1(0),tenkan(0); var : ATR2(0),up2(0),dn2(0),upper2(0),lower2(0),os2(0),spt2(0),max2(0),min2(0),kijun(0); var : senkouA(0); var : ATR3(0),up3(0),dn3(0),upper3(0),lower3(0),os3(0),spt3(0),max3(0),min3(0),senkouB(0); var : tenkan_css(0),kijun_css(0),cloud_a(0),cloud_b(0),chikou_css(0),tx(0); ATR1 = ATR(tenkan_len)*tenkan_mult; up1 = (h+L)/2 + ATR1; dn1 = (h+L)/2 - ATR1; upper1 = iff(C[1] < upper1[1],min(up1,upper1[1]),up1); lower1 = iff(C[1] > lower1[1],max(dn1,lower1[1]),dn1); os1 = iff(c > upper1 , 1 ,IFf(c < lower1, 0 , os1[1])); spt1 = iff(os1 == 1 , lower1 , upper1); max1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , max(c,max1[1]) , IFf(os1 == 1 , max(c,max1[1]) , spt1)); min1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , min(c,min1[1]) , iff(os1 == 0 , min(c,min1[1]) , spt1)); tenkan = avg(max1,min1); ATR2 = ATR(kijun_len)*kijun_mult; up2 = (h+L)/2 + ATR2; dn2 = (h+L)/2 - ATR2; upper2 = iff(C[1] < upper2[1],min(up2,upper2[1]),up2); lower2 = iff(C[1] > lower2[1],max(dn2,lower2[1]),dn2); os2 = iff(c > upper2 , 1 ,IFf(c < lower2, 0 , os2[1])); spt2 = iff(os2 == 1 , lower2 , upper2); max2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , max(c,max2[1]) , IFf(os2 == 1 , max(c,max2[1]) , spt2)); min2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , min(c,min2[1]) , iff(os2 == 0 , min(c,min2[1]) , spt2)); kijun = avg(max2,min2); senkouA = avg(kijun,tenkan); ATR3 = ATR(spanB_len)*spanB_mult; up3 = (h+L)/2 + ATR3; dn3 = (h+L)/2 - ATR3; upper3 = iff(C[1] < upper3[1],min(up3,upper3[1]),up3); lower3 = iff(C[1] > lower3[1],max(dn3,lower3[1]),dn3); os3 = iff(c > upper3 , 1 ,IFf(c < lower3, 0 , os3[1])); spt3 = iff(os3 == 1 , lower3 , upper3); max3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , max(c,max3[1]) , IFf(os3 == 1 , max(c,max3[1]) , spt3)); min3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , min(c,min3[1]) , iff(os3 == 0 , min(c,min3[1]) , spt3)); senkouB = avg(max3,min3); tenkan_css = Red; kijun_css = Blue; cloud_a = teal; cloud_b = red; chikou_css = Green; 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if Bdate != Bdate[1] Then { Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; } if Xcond == false Then { if CrossUp(tenkan,kijun) and kijun >= kijun[1] Then { Buy(); } if CrossDown(tenkan,kijun) and kijun <= kijun[1] Then { sell(); } } if MarketPosition == 1 then { if kijun < kijun[1] Then ExitLong(); ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts)); ExitLong("dbl",AtStop,EntryPrice-((당일손실+daypl)/CurrentContracts)); } if MarketPosition == -1 then { if kijun > kijun[1] Then ExitShort(); ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts)); ExitShort("dsl",AtStop,EntryPrice+((당일손실+daypl)/CurrentContracts)); } 즐거운 하루되세요 > cjfdk 님이 쓴 글입니다. > 제목 : 문의드립니다 > input : tenkan_len(9),tenkan_mult(2),kijun_len(26),kijun_mult(4),spanB_len(52),spanB_mult(6),offset(26); Input : 당일수익틱수(100),당일손실틱수(200); Var : N1(0),dayPl(0),당일수익(0),당일손실(0); var : Xcond(false); var : ATR1(0),up1(0),dn1(0),upper1(0),lower1(0),os1(0),spt1(0),max1(0),min1(0),tenkan(0); var : ATR2(0),up2(0),dn2(0),upper2(0),lower2(0),os2(0),spt2(0),max2(0),min2(0),kijun(0); var : senkouA(0); var : ATR3(0),up3(0),dn3(0),upper3(0),lower3(0),os3(0),spt3(0),max3(0),min3(0),senkouB(0); var : tenkan_css(0),kijun_css(0),cloud_a(0),cloud_b(0),chikou_css(0),tx(0); ATR1 = ATR(tenkan_len)*tenkan_mult; up1 = (h+L)/2 + ATR1; dn1 = (h+L)/2 - ATR1; upper1 = iff(C[1] < upper1[1],min(up1,upper1[1]),up1); lower1 = iff(C[1] > lower1[1],max(dn1,lower1[1]),dn1); os1 = iff(c > upper1 , 1 ,IFf(c < lower1, 0 , os1[1])); spt1 = iff(os1 == 1 , lower1 , upper1); max1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , max(c,max1[1]) , IFf(os1 == 1 , max(c,max1[1]) , spt1)); min1 = iff(CrossUp(c,spt1) or CrossDown(c,spt1) , min(c,min1[1]) , iff(os1 == 0 , min(c,min1[1]) , spt1)); tenkan = avg(max1,min1); ATR2 = ATR(kijun_len)*kijun_mult; up2 = (h+L)/2 + ATR2; dn2 = (h+L)/2 - ATR2; upper2 = iff(C[1] < upper2[1],min(up2,upper2[1]),up2); lower2 = iff(C[1] > lower2[1],max(dn2,lower2[1]),dn2); os2 = iff(c > upper2 , 1 ,IFf(c < lower2, 0 , os2[1])); spt2 = iff(os2 == 1 , lower2 , upper2); max2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , max(c,max2[1]) , IFf(os2 == 1 , max(c,max2[1]) , spt2)); min2 = iff(CrossUp(c,spt2) or CrossDown(c,spt2) , min(c,min2[1]) , iff(os2 == 0 , min(c,min2[1]) , spt2)); kijun = avg(max2,min2); senkouA = avg(kijun,tenkan); ATR3 = ATR(spanB_len)*spanB_mult; up3 = (h+L)/2 + ATR3; dn3 = (h+L)/2 - ATR3; upper3 = iff(C[1] < upper3[1],min(up3,upper3[1]),up3); lower3 = iff(C[1] > lower3[1],max(dn3,lower3[1]),dn3); os3 = iff(c > upper3 , 1 ,IFf(c < lower3, 0 , os3[1])); spt3 = iff(os3 == 1 , lower3 , upper3); max3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , max(c,max3[1]) , IFf(os3 == 1 , max(c,max3[1]) , spt3)); min3 = iff(CrossUp(c,spt3) or CrossDown(c,spt3) , min(c,min3[1]) , iff(os3 == 0 , min(c,min3[1]) , spt3)); senkouB = avg(max3,min3); tenkan_css = Red; kijun_css = Blue; cloud_a = teal; cloud_b = red; chikou_css = Green; 당일수익 = PriceScale*당일수익틱수; 당일손실 = PriceScale*당일손실틱수; if Bdate != Bdate[1] Then { Xcond = false; N1 = NetProfit; } daypl = NetProfit-N1; if TotalTrades > TotalTrades[1] then { if daypl >= 당일수익 or daypl <= -당일손실 Then Xcond = true; if (IsExitName("dbp",1) == true or IsExitName("dbl",1) == true or IsExitName("dsp",1) == true or IsExitName("dsl",1) == true) then Xcond = true; } if Xcond == false Then { if CrossUp(tenkan,kijun) Then { Buy(); } if CrossDown(tenkan,kijun) Then { sell(); } } 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)); } 수고많으십니다 얼마전 만들어주신 수식인데 한가지 더 추가 부탁드리겠습니다 매수 신호인 경우 Kijun-Sen이 직전봉보다 내려가면 진입금지 매도 청산 매도 신호인 경우 Kijun-Sen이 직전봉보다 올라가면 진입금지 매수 청산 이수식을 추가하고싶어 도움 부탁드립니다 감사합니다