답변완료
지표변환부탁드립니다
키움수식입니다
예스로 변경부탁드립니다
A=if( Macd(12,26)>0 ,3, 0)+
if( Macd(12,26)<0 ,-3, 0)+
if( Macd(12,26)>eavg(Macd(12,26),9), 1, 0)+
if( Macd(12,26)<eavg(Macd(12,26),9), -1, 0)+
if( StochasticsSlow(12,5)>80, -2, 0)+
if( StochasticsSlow(12,5)<80, 2, 0)+
if( CCI(9)>200, 3,
if( CCI(9)>100, 2,
if( CCI(9)>0, 1,
if( CCI(9)>-100, -1,
if( CCI(9)>-200, -2, -3)))))+
if( RSI(14)>70, -2, 0)+
if( RSI(14)<30, 2, 0), 3,
if(C>BBandsUp(20,2), 3,
if(C>BBandsC(20,2), 1,
if(C>BBandsdown(20,2), -1, -3)));
2023-07-18
1177
글번호 170739
지표
답변완료
부탁드립니다.
1. 당일 30분마다 보조차트1의 순매수금액을 기본차트 종가봉 위에 숫자로 구현해 주세요
그리고 동시에 보조차트2, 보조차트3, 보조차트4, 보조차트5, 보조차트6, 보조차트7, 보조차트8, 보조차트9의 순매수금액을 모두 합한 금액을 기본차트 종가봉 아래에 숫자로 구현해 주세요
그러면서 전시간대와 비교하여 금액이 늘어났으면 빨강색 숫자로, 전시간대보다 줄었으면 파란색 숫자로 구현해 주세요
2. 추가로 당일 30분마다 보조차트1의 순매수금액을 기본차트 종가봉 위에 숫자로 구현해 주시고, 동시에 보조차트2의 순매수금액을 기본차트 종가봉 아래에 숫자로 구현해 주시고, 보조차트3, 보조차트4, 보조차트5, 보조차트6, 보조차트7, 보조차트8, 보조차트9의 순매수금액을 모두 합한 금액을 기본차트 종가봉 아래 적당한 곳에 숫자로 구현해 주세요
물론 전시간대와 비교하여 금액이 늘어났으면 빨강색 숫자로, 전시간대보다 줄었으면 파란색 숫자로 구현해 주세요
고맙습니다.
2023-07-18
1214
글번호 170738
지표
답변완료
부탁드립니다.
어제 변형 부탁드렸던 수식 뒷부분 입니다.
부탁 드립니다. 항상 감사합니다.
// Set Alerts
alertcondition(ta.crossover(v_fastEMA, v_slowEMA), title='Bullish EMA Cross', message='Bullish EMA crossover')
alertcondition(ta.crossunder(v_fastEMA, v_slowEMA), title='Bearish EMA Cross', message='Bearish EMA Crossover')
// Stoch RSI code
smoothK = input.int(3, 'K', minval=1)
smoothD = input.int(3, 'D', minval=1)
lengthRSI = input.int(14, 'RSI Length', minval=1)
lengthStoch = input.int(14, 'Stochastic Length', minval=1)
rsi1 = ta.rsi(src, lengthRSI)
k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = ta.sma(k, smoothD)
bandno0 = input.int(80, minval=1, title='Upper Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')
bandno2 = input.int(50, minval=1, title='Middle Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')
bandno1 = input.int(20, minval=1, title='Lower Band', group='Bands (change this instead of length in Style for Stoch RSI colour to work properly)')
// Alerts
crossoverAlertBgColourMidOnOff = input.bool(title='Crossover Alert Background Colour (Middle Level) [ON/OFF]', group='Crossover Alerts', defval=false)
crossoverAlertBgColourOBOSOnOff = input.bool(title='Crossover Alert Background Colour (OB/OS Level) [ON/OFF]', group='Crossover Alerts', defval=false)
crossoverAlertBgColourGreaterThanOnOff = input.bool(title='Crossover Alert >input [ON/OFF]', group='Crossover Alerts', defval=false)
crossoverAlertBgColourLessThanOnOff = input.bool(title='Crossover Alert <input [ON/OFF]', group='Crossover Alerts', defval=false)
maTypeChoice = input.string('EMA', title='MA Type', group='Moving Average', options=['EMA', 'WMA', 'SMA', 'None'])
maSrc = input.source(close, title='MA Source', group='Moving Average')
maLen = input.int(200, minval=1, title='MA Length', group='Moving Average')
maValue = if maTypeChoice == 'EMA'
ta.ema(maSrc, maLen)
else if maTypeChoice == 'WMA'
ta.wma(maSrc, maLen)
else if maTypeChoice == 'SMA'
ta.sma(maSrc, maLen)
else
0
crossupCHECK = maTypeChoice == 'None' or open > maValue and maTypeChoice != 'None'
crossdownCHECK = maTypeChoice == 'None' or open < maValue and maTypeChoice != 'None'
crossupalert = crossupCHECK and ta.crossover(k, d) and (k < bandno2 or d < bandno2)
crossdownalert = crossdownCHECK and ta.crossunder(k, d) and (k > bandno2 or d > bandno2)
crossupOSalert = crossupCHECK and ta.crossover(k, d) and (k < bandno1 or d < bandno1)
crossdownOBalert = crossdownCHECK and ta.crossunder(k, d) and (k > bandno0 or d > bandno0)
aboveBandalert = ta.crossunder(k, bandno0)
belowBandalert = ta.crossover(k, bandno1)
bgcolor(color=crossupalert and crossoverAlertBgColourMidOnOff ? #4CAF50 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert Background Colour (Middle Level)', transp=70)
bgcolor(color=crossupOSalert and crossoverAlertBgColourOBOSOnOff ? #fbc02d : crossdownOBalert and crossoverAlertBgColourOBOSOnOff ? #000000 : na, title='Crossover Alert Background Colour (OB/OS Level)', transp=70)
bgcolor(color=aboveBandalert and crossoverAlertBgColourGreaterThanOnOff ? #ff0014 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert - K > Upper level', transp=70)
bgcolor(color=belowBandalert and crossoverAlertBgColourLessThanOnOff ? #4CAF50 : crossdownalert and crossoverAlertBgColourMidOnOff ? #FF0000 : na, title='Crossover Alert - K < Lower level', transp=70)
alertcondition(crossupalert or crossdownalert, title='Stoch RSI Crossover', message='STOCH RSI CROSSOVER')
2023-07-18
1344
글번호 170737
지표
답변완료
문의
아래의 지표식을 가지고 시스템을 만들고 싶습니다.
우선 지표식의 내용을 이해할수 있도록 각주좀 달아주시고요
FILTER 이 상승할때 매수 FILTER 이
FILTER 이 하락할때 매도인 식을 만들고 싶습니다.
input : f_type("Type1"),rng_qty(5),rng_scale("Average Change"),rng_per(20),smooth_range(true),smooth_per(30),mov_src("Close");
var : rng_size(0),hh(0),ll(0),bb(0),rr(0),rng_filt(0),h_band(0),l_band(0),filt(0);
var : upward(0),downward(0),filt_color(0),bar_color(0);
rng_size = iff(rng_scale=="Pips" , rng_qty*0.0001 ,
IFf(rng_scale=="Points" , rng_qty*pointvalue ,
iff(rng_scale=="% of Price", close*rng_qty/100 ,
iff(rng_scale=="ATR" , rng_qty*Ema(TrueRange, rng_per) ,
IFf(rng_scale=="Average Change" , IFf(IsNan(close[1]) == true, rng_qty*EMA(TrueRange, rng_per) , rng_qty*EMA(abs(close - close[1]), rng_per)) ,
IFf(rng_scale=="Standard Deviation" , STD(close, rng_per) ,
iff(rng_scale=="Ticks", rng_qty*PriceScale , rng_qty)))))));
if mov_src=="Wicks" Then
{
hh = h;
ll = l;
}
Else
{
hh = c;
ll = c;
}
bb = rng_size;
rr = iff(smooth_range, EMA(bb, smooth_per) , bb);
rng_filt = close;
if f_type=="Type1" Then
{
rng_filt = IFf(IsNan(rng_filt[1]) == true, close ,
IFf(hh > rng_filt[1] , IFf((hh - rr) < rng_filt[1] ,rng_filt[1], (hh - rr)) ,
IFf((ll + rr) > rng_filt[1] ,rng_filt[1] ,
(ll + rr))));
}
if f_type=="Type2" Then
{
rng_filt = IFF(IsNaN(rng_filt[1]) == true, close ,
IFf(h >= rng_filt[1] + rr , rng_filt[1] + floor(abs(hh - rng_filt[1])/rr)*rr ,
iff(ll <= rng_filt[1] - rr , rng_filt[1] - floor(abs(ll - rng_filt[1])/rr)*rr,
rng_filt[1])));
}
h_band = rng_filt + rr;
l_band = rng_filt - rr;
filt = rng_filt;
//Direction Conditions
upward = iff(filt > filt[1] , 1 , IFf(filt < filt[1] , 0 , upward));
downward = iff(filt < filt[1] , 1 , IFf(filt > filt[1] , 0 , downward));
//Colors
filt_color = iff(upward == 1, RED ,IFf(downward ==1,BLUE,GRAY));
bar_color = IFf( close > filt and close > close[1] and upward > 0 , RED ,
IFf( close > filt and close <= close[1] and upward > 0 , MAGENTA ,
IFf( close < filt and close < close[1] and downward > 0 , CYAN ,
IFf( close < filt and close >= close[1] and downward > 0 , BLUE , GREEN))));
plot1(filt, "Filter",filt_color);
plot2(h_band,"High Band",filt_color);
plot3(l_band,"Low Band",filt_color);
2023-07-18
1272
글번호 170733
시스템