답변완료
문의 드립니다!
안녕하세요!
아래 수식을 적용시 어러개의 사선이 발생되는데요
이 사선의 발생지점에 사선은 제거하고 대신 가로선이 발생되었으면 합니다
가로선의 두께와 색상은 사용자 지정이 가능토록 부탁드립니다
감사합니다!
input : af(0.2), maxAF(0.3);
input : 텍스트출력(0),선굵기(1);
var : T(0),cnt(0),count(0);
var : HH1(0),LL1(0),HD1(0),HT1(0),LD1(0),LT1(0),day1(0),day0(0),TL3(0);
var : TL1(0),TL2(0),tx1(0),tx2(0),tx11(0),tx22(0),idx(0),tx99(0),tx88(0);
Array : HD[20](0),HT[20](0),HH[20](0),LD[20](0),LT[20](0),LL[20](0);
Array : HI[20](0),LI[20](0);
var1 = CSar(af,maxAF);
if bdate != bdate[1] Then
{
day0 = sdate;
day1 = day0[1];
}
if crossup(c,var1) Then
{
T = 1;
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
HI[0] = index;
for cnt = 1 to 19
{
HD[cnt] = HD[cnt-1][1];
HT[cnt] = HT[cnt-1][1];
HH[cnt] = HH[cnt-1][1];
HI[cnt] = HI[cnt-1][1];
}
if LL[0] > 0 Then
{
Condition1 = false;
for cnt = 1 to 19
{
if Condition1 == false and abs(LL[0]-LL[cnt]) >= PriceScale*1 and LD[cnt] <= day1 Then
{
Condition1 = true;
TL1 = TL_New(LD[cnt],LT[cnt],LL[cnt],LD[0],LT[0],LL[0]);
TL_SetSize(TL1,선굵기);
TL_SetColor(TL1,magenta);
idx = abs(LI[0]-LI[cnt]);
//tx99 = Text_New(LD[0],LT[0],LL[0],NumToStr(idx,0));
Text_SetColor(tx99,magenta);
Text_SetStyle(tx99,0,3);
Text_SetBold(tx99,2);
PlaySound("C:₩예스트레이더(x64)₩data₩Sound₩.wav");
}
}
}
}
if CrossDown(c,var1) Then
{
T = -1;
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
LI[0] = index;
for cnt = 1 to 19
{
LD[cnt] = LD[cnt-1][1];
LT[cnt] = LT[cnt-1][1];
LL[cnt] = LL[cnt-1][1];
LI[cnt] = LI[cnt-1][1];
}
if HH[0] > 0 Then
{
Condition2 = false;
for cnt = 1 to 19
{
if Condition2 == false and abs(HH[0]-HH[cnt]) >= PriceScale*1 and HD[cnt] <= day1 Then
{
Condition2 = true;
TL2 = TL_New(HD[cnt],HT[cnt],HH[cnt],HD[0],HT[0],HH[0]);
TL_SetSize(TL2,선굵기);
TL_SetColor(TL2,blue);
idx = abs(HI[0]-HI[cnt]);
//tx99 = Text_New(HD[0],HT[0],HH[0],NumToStr(idx,0));
Text_SetColor(tx99,blue);
Text_SetStyle(tx99,0,3);
Text_SetBold(tx99,2);
PlaySound("C:₩예스트레이더(x64)₩data₩Sound₩.wav");
}
}
}
}
if T == 1 then
{
if H > HH[0] Then
{
HH[0] = H;
HD[0] = sdate;
HT[0] = stime;
if Condition3 == false and abs(HH[0]-HH[cnt]) >= PriceScale*1 and HD[cnt] <= day1 Then
{
Condition3 = true;
TL3 = TL_New(HD[cnt],HT[cnt],HH[cnt],HD[0],HT[0],HH[0]);
TL_SetSize(TL3,선굵기);
TL_SetColor(TL3,magenta);
idx = abs(HI[0]-HI[cnt]);
//tx88 = Text_New(HD[0],HT[0],HH[0],NumToStr(idx,0));
Text_SetColor(tx88,magenta);
Text_SetStyle(tx88,0,3);
Text_SetBold(tx88,2);
PlaySound("C:₩예스트레이더(x64)₩data₩Sound₩.wav");
}
}
}
if T == -1 then
{
if L < LL[0] Then
{
LL[0] = L;
LD[0] = sdate;
LT[0] = stime;
if Condition3 == false and abs(LL[0]-LL[cnt]) >= PriceScale*1 and LD[cnt] <= day1 Then
{
Condition3 = true;
TL3 = TL_New(LD[cnt],LT[cnt],LL[cnt],LD[0],LT[0],LL[0]);
TL_SetSize(TL3,선굵기);
TL_SetColor(TL3,blue);
idx = abs(LI[0]-LI[cnt]);
//tx88 = Text_New(LD[0],LT[0],LL[0],NumToStr(idx,0));
Text_SetColor(tx88,blue);
Text_SetStyle(tx88,0,3);
Text_SetBold(tx88,2);
PlaySound("C:₩예스트레이더(x64)₩data₩Sound₩.wav");
}
}
}
2024-02-05
439
글번호 176417
지표
답변완료
문의드립니다.
안녕하세요
지표 변화 문의드릴 수 있을지요
도움주셔서 항상 감사드립니다.
//@version=2
study(title = "Smoothed", shorttitle="Candles", overlay=true)
len=input(10)
o=ema(open,len)
c=ema(close,len)
h=ema(high,len)
l=ema(low,len)
haclose = (o+h+l+c)/4
haopen = na(haopen[1]) ? (o + c)/2 : (haopen[1] + haclose[1]) / 2
hahigh = max (h, max(haopen,haclose))
halow = min (l, min(haopen,haclose))
len2=input(10)
o2=ema(haopen, len2)
c2=ema(haclose, len2)
h2=ema(hahigh, len2)
l2=ema(halow, len2)
col=o2>c2 ? red : lime
plotcandle(o2, h2, l2, c2, title="smoothed", color=col)
2024-02-05
615
글번호 176405
지표
답변완료
부탁드립니다.
$,안녕하세요 차장님!
아래 키움식을 예스식으로 변환 부탁드립니다.
첨부파일 처럼 표현하고 싶슴니다
$$$,언제나 늘 고맙습니다.
수식1
중심선=BBandsC(period,D1);
상단선=BBandsUp(period,D1);
하단선=BBandsDown(period,D1);
Bb=(종가-하단선)/(상단선-하단선)*100
수식2
중심선=BBandsC(period,D1);
상단선=BBandsUp(period,D1);
하단선=BBandsDown(period,D1);
Bb=(종가-하단선)/(상단선-하단선)*100
수식3
중심선=BBandsC(period,D1);
상단선=BBandsUp(period,D1);
하단선=BBandsDown(period,D1);
Bb=(종가-하단선)/(상단선-하단선)*100
수식4
중심선=BBandsC(period,D1);
상단선=BBandsUp(period,D1);
하단선=BBandsDown(period,D1);
Bb=(종가-하단선)/(상단선-하단선)*100;
tema(Bb,signal1)
수식5
중심선=BBandsC(period,D1);
상단선=BBandsUp(period,D1);
하단선=BBandsDown(period,D1);
Bb=(종가-하단선)/(상단선-하단선)*100;
tema(tema(Bb,signal1),signal2)
지표설정조건
period 20
D1 2
signal1 3
signal2 3
기준선 50
2024-02-05
893
글번호 176400
지표
답변완료
지표 오류 수정 부탁드립니다.
항상 많은 도움 감사드립니다.
input : length(10),dev(1),fastLength(12),slowLength(26),signalLength(9);
var : fastma(0),slowma(0),macdv(0),stdv(0),Upper(0),Lower(0),mc(0);
fastMA = ema(close, fastLength);
slowMA = ema(close, slowLength);
macdv = fastMA - slowMA;
Stdv = std(macdv, length);
Upper = (Stdv * dev + (ma(macdv, length)));
Lower = ((ma(macdv, length)) - (Stdv * dev));
Plot1(Upper,"Upper",gray);
Plot2(Lower,"Lower",gray);
Plot3(macdv,"macdv",
IFf(macdv>Upper && macdv>0,Red,
IFf(macdv>Upper && macdv<0,Yellow,
iff(macdv<Lower && macdv<0,Blue,
iff(macdv<Lower && macdv>0,Green)))),Def,4);
PlotBaseLine1(0);
위와 같이 지표식을 작성했는데요 plot3에 조건별로 색깔을 지정하는 부분에서 오류가 납니다. 수정 부탁드립니다.
2024-02-05
690
글번호 176392
지표