커뮤니티

73025 글 수식 응용

프로필 이미지
당일선물
2022-03-25 07:08:08
1361
글번호 157446
답변완료
73025 글 작성해주신 halftrend 수식을 응용하여 ================== input : amplitude(2),channelDeviation(2); var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0); var : up(0),down(0),atrHigh(0),atrLow(0),arrowUp(0),arrowDown(0); var : atr2(0),dev(0),highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0); atr2 = atr(100) / 2; dev = channelDeviation * atr2; highPrice = Highest(H,amplitude); lowPrice = Lowest(L,amplitude); highma = ma(high, amplitude); lowma = ma(low, amplitude); if nextTrend == 1 Then { maxLowPrice = max(lowPrice, maxLowPrice); if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then { trend = 1; nextTrend = 0; minHighPrice = highPrice; } } else { minHighPrice = min(highPrice, minHighPrice); if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then { trend = 0; nextTrend = 1; maxLowPrice = lowPrice; } } if trend == 0 Then { if IsNaN(trend[1]) == False and trend[1] != 0 Then { up = iff(IsNaN(down[1]) == true,down,down[1]); arrowUp = up - atr2; } else { up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1])); } atrHigh = up + dev; atrLow = up - dev; } else { if isnan(trend[1]) == False and trend[1] != 1 Then { down = iff(IsNan(up[1]) == true, up , up[1]); arrowDown = down + atr2; } else { down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1])); } atrHigh = down + dev; atrLow = down - dev; } ht = iff(trend == 0 , up , down); plot1(ht, "HalfTrend",iff(trend == 0 ,BLUE,RED)); plot2(atrHigh,"ATR High",RED); plot3(atrLow, "ATR Low", BLUE); ================== 1.<<종목검색>>halftrend 가 강세 uptrend 일 때 rsi 가 30을 돌파하는 종목을 검색하는 수식을 부탁드립니다. 2.<<시스템식>>halftrend 가 강세 uptrend 일 때 rsi 가 30을 상향돌파할때 매수 halftrend 가 약세 down trend 일 때 rsi가 70을 하향돌파할때 매도 하는 시스템 식을 부탁드립니다.. 감사합니다
종목검색
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-03-25 13:13:50

안녕하세요 예스스탁입니다. 1 input : amplitude(2),channelDeviation(2),Period(14); var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0); var : up(0),down(0),atrHigh(0),atrLow(0),arrowUp(0),arrowDown(0); var : atr2(0),dev(0),highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0),rsiv(0); atr2 = atr(100) / 2; dev = channelDeviation * atr2; highPrice = Highest(H,amplitude); lowPrice = Lowest(L,amplitude); highma = ma(high, amplitude); lowma = ma(low, amplitude); if nextTrend == 1 Then { maxLowPrice = max(lowPrice, maxLowPrice); if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then { trend = 1; nextTrend = 0; minHighPrice = highPrice; } } else { minHighPrice = min(highPrice, minHighPrice); if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then { trend = 0; nextTrend = 1; maxLowPrice = lowPrice; } } if trend == 0 Then { if IsNaN(trend[1]) == False and trend[1] != 0 Then { up = iff(IsNaN(down[1]) == true,down,down[1]); arrowUp = up - atr2; } else { up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1])); } atrHigh = up + dev; atrLow = up - dev; } else { if isnan(trend[1]) == False and trend[1] != 1 Then { down = iff(IsNan(up[1]) == true, up , up[1]); arrowDown = down + atr2; } else { down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1])); } atrHigh = down + dev; atrLow = down - dev; } ht = iff(trend == 0 , up , down); rsiv = rsi(Period); if ht == up and CrossUp(rsiv,30) Then find(0); 2 input : amplitude(2),channelDeviation(2),Period(14); var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0); var : up(0),down(0),atrHigh(0),atrLow(0),arrowUp(0),arrowDown(0); var : atr2(0),dev(0),highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0),rsiv(0); atr2 = atr(100) / 2; dev = channelDeviation * atr2; highPrice = Highest(H,amplitude); lowPrice = Lowest(L,amplitude); highma = ma(high, amplitude); lowma = ma(low, amplitude); if nextTrend == 1 Then { maxLowPrice = max(lowPrice, maxLowPrice); if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then { trend = 1; nextTrend = 0; minHighPrice = highPrice; } } else { minHighPrice = min(highPrice, minHighPrice); if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then { trend = 0; nextTrend = 1; maxLowPrice = lowPrice; } } if trend == 0 Then { if IsNaN(trend[1]) == False and trend[1] != 0 Then { up = iff(IsNaN(down[1]) == true,down,down[1]); arrowUp = up - atr2; } else { up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1])); } atrHigh = up + dev; atrLow = up - dev; } else { if isnan(trend[1]) == False and trend[1] != 1 Then { down = iff(IsNan(up[1]) == true, up , up[1]); arrowDown = down + atr2; } else { down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1])); } atrHigh = down + dev; atrLow = down - dev; } ht = iff(trend == 0 , up , down); rsiv = rsi(Period); if trend == 0 and CrossUp(rsiv,30) Then Buy(); if trend != 0 and CrossDown(rsiv,70) Then Sell(); 즐거운 하루되세요 > 당일선물 님이 쓴 글입니다. > 제목 : 73025 글 수식 응용 > 73025 글 작성해주신 halftrend 수식을 응용하여 ================== input : amplitude(2),channelDeviation(2); var : trend(0),nextTrend(0),maxLowPrice(0),minHighPrice(0); var : up(0),down(0),atrHigh(0),atrLow(0),arrowUp(0),arrowDown(0); var : atr2(0),dev(0),highPrice(0),lowPrice(0),highma(0),lowma(0),ht(0); atr2 = atr(100) / 2; dev = channelDeviation * atr2; highPrice = Highest(H,amplitude); lowPrice = Lowest(L,amplitude); highma = ma(high, amplitude); lowma = ma(low, amplitude); if nextTrend == 1 Then { maxLowPrice = max(lowPrice, maxLowPrice); if highma < maxLowPrice and close < iff(isnan(low[1])==true,low,Low[1]) Then { trend = 1; nextTrend = 0; minHighPrice = highPrice; } } else { minHighPrice = min(highPrice, minHighPrice); if lowma > minHighPrice and close > iff(isnan(high[1])==true,high,high[1]) Then { trend = 0; nextTrend = 1; maxLowPrice = lowPrice; } } if trend == 0 Then { if IsNaN(trend[1]) == False and trend[1] != 0 Then { up = iff(IsNaN(down[1]) == true,down,down[1]); arrowUp = up - atr2; } else { up = iff(IsNan(up[1]) == true, maxLowPrice , max(maxLowPrice, up[1])); } atrHigh = up + dev; atrLow = up - dev; } else { if isnan(trend[1]) == False and trend[1] != 1 Then { down = iff(IsNan(up[1]) == true, up , up[1]); arrowDown = down + atr2; } else { down = iff(IsNan(down[1]) == true, minHighPrice ,min(minHighPrice, down[1])); } atrHigh = down + dev; atrLow = down - dev; } ht = iff(trend == 0 , up , down); plot1(ht, "HalfTrend",iff(trend == 0 ,BLUE,RED)); plot2(atrHigh,"ATR High",RED); plot3(atrLow, "ATR Low", BLUE); ================== 1.<<종목검색>>halftrend 가 강세 uptrend 일 때 rsi 가 30을 돌파하는 종목을 검색하는 수식을 부탁드립니다. 2.<<시스템식>>halftrend 가 강세 uptrend 일 때 rsi 가 30을 상향돌파할때 매수 halftrend 가 약세 down trend 일 때 rsi가 70을 하향돌파할때 매도 하는 시스템 식을 부탁드립니다.. 감사합니다