답변완료
안녕하세요
무더운 날씨에 노고가 많으십니다
혹시 예스랭귀지로 변환이 가능할지하여
문의드립니다.
항상 도움주셔서 감사드립니다
좋은 하루되세요!
study("SHK")
sensitivity = input(150, title="Sensitivity")
fastLength=input(20, title="FastEMA Length")
slowLength=input(40, title="SlowEMA Length")
channelLength=input(20, title="BB Channel Length")
mult=input(2.0, title="BB Stdev Multiplier")
DEAD_ZONE = nz(rma(tr(true),100)) * 3.7
calc_macd(source, fastLength, slowLength) =>
fastMA = ema(source, fastLength)
slowMA = ema(source, slowLength)
fastMA - slowMA
calc_BBUpper(source, length, mult) =>
basis = sma(source, length)
dev = mult * stdev(source, length)
basis + dev
calc_BBLower(source, length, mult) =>
basis = sma(source, length)
dev = mult * stdev(source, length)
basis - dev
t1 = (calc_macd(close, fastLength, slowLength) - calc_macd(close[1], fastLength, slowLength))*sensitivity
e1 = (calc_BBUpper(close, channelLength, mult) - calc_BBLower(close, channelLength, mult))
trendUp = (t1 >= 0) ? t1 : 0
trendDown = (t1 < 0) ? (-1*t1) : 0
plot(trendUp, style=columns, linewidth=1, color=(trendUp<trendUp[1])?lime:green, transp=45, title="UpTrend")
plot(trendDown, style=columns, linewidth=1, color=(trendDown<trendDown[1])?orange:red, transp=45, title="DownTrend")
plot(e1, style=line, linewidth=2, color=#A0522D, title="ExplosionLine")
plot(DEAD_ZONE, color=blue, linewidth=1, style=cross, title="DeadZoneLine")
2024-07-30
1153
글번호 182053
지표
답변완료
sellVolume 곱하기4배 종목검색식 부탁해요
var : buyVolume(0),sellVolume(0);
buyVolume = iff( (high==low), 0, volume*(close-low)/(high-low));
sellVolume = iff( (high==low), 0, volume*(high-close)/(high-low));
if CROSSUP(buyVolume,sellVolume) && C>O Then
Find(1);
sellvolume 곱하기 4배보다 buyvoluem이 크다 종목검색식 부탁해요
2024-07-30
1068
글번호 182037
검색
답변완료
문의 드립니다.
아래식에서 매수하는 횟수와 청산 시점을 변경하고자 합니다.
우선 매수는 MACD 0선 아래서 발생하는 골든 신호는 모두 매수입니다.
(피라미딩 연속 매수)
그리고 청산은 MACD 0선이 아니라 당일 시가 이탈 시 모든 보유 수량을 매도 청산 완료
그리고 코인에서 적용할 수 있도록 수량을 금액으로 입력할 수 있게 부탁드립니다.
방식은 위에 수량으로 했을 때와 동일하게 할까 합니다.
수량으로 할 수 있는 것과
금액으로 할 수 있는 것으로 두 종류로 부탁드립니다.
Input :short(12),long(26),sig(9),수량(10);
value1 = MACD(short,long);
value2 = Ema(value1,sig);
If value1 < 0 and CrossDown(value1,Value2) and C > DayOpen(0) Then
{
Buy("b",OnClose,Def,수량);
}
if MarketPosition == 1 and CrossDown(value1,0) Then
ExitLong();
2024-07-30
839
글번호 182032
시스템