답변완료
문의 드립니다.
study(title="RSI OverBought/Sold Price Predict", shorttitle="RSI", overlay=true, format=format.price, precision=2, resolution="")
len = input(14, minval=1, title="Length")
src = input(close, "Source", type = input.source)
on5 = input(true,"RSI 50 Line")
on73 = input(true,"RSI OB/S 1 Line On/Off")
on82 = input(true,"RSI OB/S 2 Line On/Off")
on91 = input(false,"RSI OB/S 3 Line On/Off")
r70 = input(70, "OverBought 1",maxval=99,minval=1)
r30 = input(30, "OverSold 1",maxval=99,minval=1)
r80 = input(80, "OverBought 2",maxval=99,minval=1)
r20 = input(20, "OverSold 2",maxval=99,minval=1)
r90 = input(90, "OverBought 3",maxval=99,minval=1)
r10 = input(10, "OverSold 3",maxval=99,minval=1)
smooth = input(false,"Smoothing")
up = rma(max(change(src), 0), len)
down = rma(-min(change(src), 0), len)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
a = 1/len
rc70 = 100/(100-r70)-1
rc30 = 1/(100/(100-r30)-1)
rc80 = 100/(100-r80)-1
rc20 = 1/(100/(100-r20)-1)
rc90 = 100/(100-r90)-1
rc10 = 1/(100/(100-r10)-1)
c70e = (1-a)/a*(rc70*down-up)+close
c30e = close-(1-a)/a*(rc30*up-down)
c80e = (1-a)/a*(rc80*down-up)+close
c20e = close-(1-a)/a*(rc20*up-down)
c90e = (1-a)/a*(rc90*down-up)+close
c10e = close-(1-a)/a*(rc10*up-down)
c50 = (1-a)/a*(down-up)+close
lens = floor(len/3)
c70 = if smooth == true
sma(c70e,lens)
else
c70e
c30 = if smooth == true
sma(c30e,lens)
else
c30e
c80 = if smooth == true
sma(c80e,lens)
else
c80e
c20 = if smooth == true
sma(c20e,lens)
else
c20e
c90 = if smooth == true
sma(c90e,lens)
else
c90e
c10 = if smooth == true
sma(c10e,lens)
else
c10e
plot(on73? c70:na,color=color.orange, style=plot.style_stepline,offset=1)
plot(on73? c30:na,color=color.orange,style=plot.style_stepline,offset =1)
plot(on82? c80:na,color=color.yellow,style=plot.style_stepline,offset=1)
plot(on82? c20:na,color=color.yellow,style=plot.style_stepline,offset =1)
plot(on91? c90:na,color=color.green,style=plot.style_stepline,offset=1)
plot(on91? c10:na,color=color.green,style=plot.style_stepline,offset =1)
plot(on5? c50:na,color=color.white,style=plot.style_stepline,offset=1)
트레이딩뷰 지표입니다.
예스 수식으로 좀 변환해주세요.
2023-11-29
970
글번호 174411
지표
답변완료
문의드립니다
수고가 많으십니다.
다름이아니라 아래식중 b1중 수량30%가 1단위로 끝날경우
올림하여 갯수를 10단위로 매도할수있게 부탁드립니다.
추운날씨에 건강조심하세요.
감사합니다.
input : short1(12),long1(26),sig1(9);
input : short2(12),long2(26),sig2(9);
input : Per(30);
var : MACDO1(0,Data1),MACDO2(0,Data2);
MACDO1 = Data1(MACD_OSC(short1,long1,sig1));
MACDO2 = Data2(MACD_OSC(short2,long2,sig2));
if MarketPosition == 0 and Data2(CrossUp(MACDO2,0)) Then
Buy();
if MarketPosition == 1 Then
{
if data1(CrossDown(MACDO1,0)) Then
ExitLong("bx1",OnClose,Def,"",Ceiling(MaxContracts*(Per/100)),2);
if data2(CrossDown(MACDO2,0)) Then
ExitLong("bx2");
}
2023-11-29
915
글번호 174410
시스템
답변완료
수식수정
input : P(20),dv(2),t(100),n(10);
var : bbup(0),bbdn(0),bbmd(0);
bbup = BollBandUp(P,dv);
bbdn = BollBandDown(P,dv);
bbmd = ma(C,P);
if MarketPosition <= 0 and CrossUp(C,bbup) and CountIf(BBup-bbdn <= PriceScale*t,10)[1] == 10 Then
Buy();
if MarketPosition >= 0 and CrossDown(C,bbdn) and CountIf(BBup-bbdn <= PriceScale*t,10)[1] == 10 Then
Sell();
추가식
위식에서 현매수조건 100틱이내 10봉 이내를 =10봉 이상으로 수정해주세요
일일누적수익 50틱 매매스톱
2023-11-29
991
글번호 174409
시스템
답변완료
스크립트 변환 부탁드립니다.
안녕하세요.
아래의 트레이딩뷰 파인스크립트를 예스랭귀지로 변환 부탁드립니다.
//@version=5
strategy("Bollinger Bands Strategy", overlay=true)
source = close
length = input.int(20, minval=1)
mult = input.float(2.0, minval=0.001, maxval=50)
basis = ta.sma(source, length)
dev = mult * ta.stdev(source, length)
upper = basis + dev
lower = basis - dev
buyEntry = ta.crossover(source, lower)
sellEntry = ta.crossunder(source, upper)
if (ta.crossover(source, lower))
strategy.entry("BBandLE", strategy.long, stop=lower, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandLE")
else
strategy.cancel(id="BBandLE")
if (ta.crossunder(source, upper))
strategy.entry("BBandSE", strategy.short, stop=upper, oca_name="BollingerBands", oca_type=strategy.oca.cancel, comment="BBandSE")
else
strategy.cancel(id="BBandSE")
2023-11-29
891
글번호 174406
시스템