답변완료
일봉용 지표 입니다
일봉의 지표를 3분봉(또는 15분봉)에 나타낼 수 있을까요?
input : 기간1(5), 기간2(20),Period(14);
Var : 이평종류(1), D1(0), D2(0), M5(0), M20(0),F(0),조건(False);
F = Ema(v*(c-c[1]),Period);
M5 = ma(c,5);
M20 = ma(c,20);
조건 = CrossUp(M5,M20) && F>0;
if 조건==true and 조건[1] == False Then
var1 = M5;
if var1> 0 Then
Plot1(VAR1);
2023-12-13
1364
글번호 174821
지표
답변완료
매수건수 고저라인
var1 = (data2(c)-data3(c));
If var1[0] > var1[1] Then
Plot1(var1, "잔량건수차이",red);
Else
Plot1(var1, "잔량건수차이",blue);
PlotBaseLine1(0,"기준선1");
차트 밖으로 지나가면 무시하고, 차트에 현재 보이는 부분에서만 최고 최저점 수평연장라인.
고점 저점끼리 연결라인이 아니고, 최고점 최저점만 수평연장라인. 감사합니다.
2023-12-13
1471
글번호 174817
지표
답변완료
수식추가
input : EmaPeriod(50);
input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7);
input : ADXPeriod(10);
input : 익절(50),손절(50);
var : Emav(0),RSI1(0),RSI2(0),RSI3(0),ADXv(0);
var : Bcond(False),Scond(False);
Emav = Ema(C,EmaPeriod);
RSI1 = RSI(RSIPeriod1);
RSI2 = RSI(RSIPeriod2);
RSI3 = RSI(RSIPeriod3);
ADXv = ADX(ADXperiod);
Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1;
Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1;
if C > Emav and
RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and
ADXV >= 21 and
Bcond == False Then
buy();
if C < Emav and
RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and
ADXV >= 21 and
Scond == False Then
Sell();
SetStopProfittarget(익절, PointStop);
SetStopLoss(손절, PointStop);
안녕하세요
위식에서 해선 월물 변경시 전월데이터 연결식
부탁드림니다
전월데이터 + 당월데이터 연결매매식.
2023-12-13
1124
글번호 174815
시스템
답변완료
수식변환 부탁드려요
지표식과 시스템식으로 2가지 변환 부탁드립니다
//@version=4
study(title="Kgb", overlay = true)
src = close
keyvalue = input(5, title = "Key Vaule. 'This changes the sensitivity'", step = .5)
atrperiod = input(10, title="ATR Period")
xATR = atr(atrperiod)
nLoss = keyvalue * xATR
xATRTrailingStop = 0.0
xATRTrailingStop := iff(src > nz(xATRTrailingStop[1], 0) and src[1] > nz(xATRTrailingStop[1], 0), max(nz(xATRTrailingStop[1]), src - nLoss),
iff(src < nz(xATRTrailingStop[1], 0) and src[1] < nz(xATRTrailingStop[1], 0), min(nz(xATRTrailingStop[1]), src + nLoss),
iff(src > nz(xATRTrailingStop[1], 0), src - nLoss, src + nLoss)))
pos = 0
pos := iff(src[1] < nz(xATRTrailingStop[1], 0) and src > nz(xATRTrailingStop[1], 0), 1,
iff(src[1] > nz(xATRTrailingStop[1], 0) and src < nz(xATRTrailingStop[1], 0), -1, nz(pos[1], 0)))
xcolor = pos == -1 ? color.red: pos == 1 ? color.green : color.blue
plot(xATRTrailingStop, color = xcolor, title = "Trailing Stop")
buy = crossover(src,xATRTrailingStop)
sell = crossunder(src,xATRTrailingStop)
barcolor = src > xATRTrailingStop
plotshape(buy, title = "Buy", text = 'Buy', style = shape.labelup, location = location.belowbar, color= color.green,textcolor = color.white, transp = 0, size = size.tiny)
plotshape(sell, title = "Sell", text = 'Sell', style = shape.labeldown, color= color.red,textcolor = color.white, transp = 0, size = size.tiny)
barcolor(barcolor? color.green:color.red)
alertcondition(buy, title='KGB Buy', message='KGB Buy')
alertcondition(sell, title='KGB Sell', message='KGB Sell')
2023-12-13
1618
글번호 174813
시스템