답변완료
수식작성 부탁드립니다.
안녕하세요. 운영자님
아래 사이트의 트레이딩뷰 수식을 예스트레이더 수식으로 변환가능하신지 문의/부탁드립니다.
감사합니다.
rsiPeriod = input(11, minval = 1, title = "RSI Period")
bandLength = input(31, minval = 1, title = "Band Length")
lengthrsipl = input(1, minval = 0, title = "Fast MA on RSI")
lengthtradesl = input(9, minval = 1, title = "Slow MA on RSI")
src = close // Source of Calculations (Close of Bar)
r = rsi(src, rsiPeriod) // RSI of Close
ma = sma(r, bandLength) // Moving Average of RSI [current]
offs = (1.6185 * stdev(r, bandLength)) // Offset
up = ma + offs // Upper Bands
dn = ma - offs // Lower Bands
mid = (up + dn) / 2 // Average of Upper and Lower Bands
fastMA = sma(r, lengthrsipl) // Moving Average of RSI 2 bars back
slowMA = sma(r, lengthtradesl) // Moving Average of RSI 7 bars back
hline(30) // Oversold
hline(50) // Midline
hline(70) // Overbought
upl = plot(up, "Upper Band", color = blue) // Upper Band
dnl = plot(dn, "Lower Band", color = blue) // Lower Band
midl = plot(mid, "Middle of Bands", color = orange, linewidth = 2) // Middle of Bands
plot(slowMA, "Slow MA", color=green, linewidth=2) // Plot Slow MA
plot(fastMA, "Fast MA", color=red, linewidth=2) // Plot Fast MA
fill(upl, midl, red, transp=90) // Fill Upper Half Red
fill(midl, dnl, green, transp=90) // Fill Lower Half Green
2023-03-24
1055
글번호 167492
지표
답변완료
수식 문의 드립니다
항상 감사드립니다.
현재 아래의 수식은 진입이 항상 매수만 되는 수식인데,
매도도 진입가능한 (매수/매도 모두 진입가능한) 수식으로 바꿔주시면 감사드리겠습니다.
Input : 매수장기이평길이(200), 매수단기이평길이(10), 매수RSI길이(2), 매수RSI기준(5), 매도이평(10), 매도RSI길이(2), 매도RSI기준(75);
Var : longCondition(False), exitCondition(False);
longCondition = ma(close, 매수장기이평길이) < close and ma(close, 매수단기이평길이) > Close and rsi(매수RSI길이) < 매수RSI기준;
exitCondition = ma(close, 매도이평) < Close and rsi(매도RSI길이) > 매도RSI기준;
if longCondition Then
{
Buy("매수", AtMarket);
}
if exitCondition Then
{
Exitlong("매도", AtMarket);
}
2023-03-24
1037
글번호 167489
시스템