답변완료
수식 부탁드립니다.
안녕하세요?
아래의 수식을 적용했는데 점크기와 점색상과 경고소리의 반응이 전혀 없어요!
여러가지 사운드의 파일을 변화시켜 적용해보고, 잠크기와, 색상도 조정해 봤는데도
점크기, 색상변화가 없는데 다시 점검부탁드리겠습니다.
여러번 부탁드려서 죄송합니다,
마지막으로 점검 부탁합니다.
감사합니다.
input : Period(250),선두께(3);
Var:상승색(LightGreen), 하락색(Blue);
Var: 점크기(50),상승점(Red), 하락점(Blue);
Var:j(0),T(0);
Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0),
date21(0),date22(0),time21(0),time22(0),
date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0);
Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0);
var : box1(0),box2(0),box3(0),box4(0);
Plot1(0);
For j = 0 To 19
{
HiBar[j] = HiBar[j] + 1;
LoBar[j] = LoBar[j] + 1;
}
if crossup(c,highest(H,Period)[1]) Then
T = 1;
if CrossDown(c,Lowest(L,Period)[1]) Then
T = -1;
If T == -1 Then
{
If T[1] != -1 Then
{
For j = 18 DownTo 0
{
LoVal[j+1] = LoVal[j];
LoBar[j+1] = LoBar[j];
}
LoVal[0] = L;
LoBar[0] = 0;
date11 = date[HiBar[0]];
time11 = stime[HiBar[0]];
Value11 = HiVal[0];
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,하락색);
date21 = date[HiBar[0]];
time21 = stime[HiBar[0]];
date22 = date[0];
time22 = stime[0];
box1 = Box_New(sdate,stime,LoVal[0]-0.25,NextBarSdate,NextBarStime,LoVal[0]-0.50);
Box_SetColor(box1,Green);
Box_SetFill(box1,true);
box2 = box1[1];
Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50);
}
If LoVal[0] > L Then
{
LoVal[0] = L;
LoBar[0] = 0;
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date22 = date[0];
time22 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
Box_SetBegin(box1,sDate,sTime,LoVal[0]-0.25);
Box_SetEnd(box2,Sdate,Stime,LoVal[1]-0.50);
}
}
If T == 1 Then
{
If T[1] != 1 Then
{
For j = 18 DownTo 0
{
HiVal[j+1] = HiVal[j];
HiBar[j+1] = HiBar[j];
}
HiVal[0] = H;
HiBar[0] = 0;
date11 = date[LoBar[0]];
time11 = stime[LoBar[0]];
Value11 = LoVal[0];
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,상승색);
date31 = date[LoBar[0]];
time31 = stime[LoBar[0]];
date32 = date[0];
time32 = stime[0];
box3 = Box_New(sdate,stime,HiVal[0]+0.25,NextBarSdate,NextBarStime,HiVal[0]+0.50);
Box_SetColor(box3,Yellow);
Box_SetFill(box3,true);
box4 = box3[1];
Box_SetEnd(box3,Sdate,Stime,HiVal[1]+0.50);
}
If HiVal[0] < H Then
{
HiVal[0] = H;
HiBar[0] = 0;
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date32 = date[0];
time32 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
Box_SetBegin(box3,sDate,sTime,HiVal[0]+0.25);
Box_SetEnd(box4,Sdate,Stime,HiVal[1]+0.50);
}
}
Box_SetEnd(box1,NextBarSdate,NextBarStime,LoVal[0]-0.5);
Box_SetEnd(box3,NextBarSdate,NextBarStime,HiVal[0]+0.5);
TL_SetSize(TL1,선두께);
var : tx99(0);
if T == -1 and T != T[1] Then
{
tx99 = text_new(sDate,sTime,L,"■");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,하락점);
Text_SetSize(Tx,점크기);
if NextBarOpen > 0 Then
{
PlaySound("C:NHTader₩data₩Sound₩sound8.wav");
}
}
if T == 1 and T != T[1] Then
{
tx99 = text_new(sDate,sTime,L,"■");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,상승점);
Text_SetSize(Tx,점크기);
if NextBarOpen > 0 Then
{
PlaySound("C:₩NHTrader₩data₩Sound₩sound8.wav");
}
}
2024-10-28
627
글번호 184636
지표
답변완료
89647 글 확인좀 요청 드림니다.
* 좋은 한주 되십시요
* 아래글이 안되는데 수정 좀 요청 드림니다.
* 요청 사항: 고가선 3번째 크로스업 되면 봉 강조
저가선 3번째 크로스 다운 되면 봉강조.
즉 봉 중간값이(h+l)/2 이전에 고가선 3개를 크로스업 되면 봉강조
봉 중간값이(h+l)/2 이전에 저가선 3개를 크로스다운 되면 봉강조
## 아래
input : P(2),n(7),틱(2), 굵기(1);
var : TX(0);
var : cnt(0),LL(0),HH(0);
Array : LTL[10](0),HTL[10](0);
var : LTL1(0),LTL2(0),LTL3(0),LTL4(0),LTL5(0),LTL6(0);
var : HTL1(0),HTL2(0),HTL3(0),HTL4(0),HTL5(0),HTL6(0);
if L < Lowest(L,P)[1] and (LL == 0 or (LL > 0 and abs(L-LL) >= PriceScale*틱)) Then
{
LL = L+0.04;
For cnt = 9 DownTo 1
{
LTL[cnt] = LTL[cnt-1];
}
LTL[0] = TL_new(sDate,sTime,LL,NextBarSdate,NextBarStime,LL);
TL_SetColor(LTL[0],LGreen);
TL_SetSize(LTL[0],굵기);
TL_Delete(LTL[n]);
}
Else
{
TL_SetEnd(LTL[0],sDate,sTime,LL);
}
if H > highest(H,P)[1] and (HH == 0 or (HH > 0 and abs(H-HH) >= PriceScale*틱)) Then
{
HH = H-0.04;
For cnt = 9 DownTo 1
{
HTL[cnt] = HTL[cnt-1];
}
HTL[0] = TL_new(sDate,sTime,HH,NextBarSdate,NextBarStime,HH);
TL_SetColor(HTL[0],Red);
TL_SetSize(HTL[0],굵기);
TL_Delete(HTL[n]);
}
Else
{
TL_SetEnd(HTL[0],sDate,sTime,HH);
}
if H >= L+PriceScale*20 and C > O and CrossUp((H+L)/2,HH) Then
PlotPaintBar(H,L,"강조",Red);
if H >= L+PriceScale*20 and C < O and CrossDown((H+L)/2,LL) Then
PlotPaintBar(H,L,"강조",Blue);
수고하십시요.
2024-10-28
717
글번호 184633
지표
답변완료
문의 드립니다.
안녕하세요
아래 지표 수식도 예스로 변경이 변경이 가능한지 궁금합니다.
감사합니다.
indicator("Radius Trend [ChartPrime]", overlay = true)
// --------------------------------------------------------------------------------------------------------------------}
// 𝙐𝙎𝙀𝙍 𝙄𝙉𝙋𝙐𝙏𝙎
// --------------------------------------------------------------------------------------------------------------------{
// @variable Step size for radius adjustment
float step = input.float(0.15, "Radius Step", step = 0.001)
// @variable Multiplier for initial distance calculation
float multi = input.float(2, "Start Points Distance", step = 0.1)
// Initialize variables
bool trend = na
var float multi1 = 0.
var float multi2 = 0.
int n = 3
var float band = 0.
// --------------------------------------------------------------------------------------------------------------------}
// 𝙄𝙉𝘿𝙄𝘾𝘼𝙏𝙊𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// --------------------------------------------------------------------------------------------------------------------{
// Calculate distances for band placement
float distance = ta.sma(math.abs(high-low), 100) * multi
float distance1 = ta.sma(math.abs(high-low), 100) * 0.2
// Initialize trend and band on the 101st bar
if bar_index == 101
trend := true
band := low * 0.8
// trend based on price relation to band
if close < band
trend := false
if close > band
trend := true
// Adjust band on trend changes
if trend[1] == false and ta.change(trend)
band := low - distance
if trend[1] == true and ta.change(trend)
band := high + distance
// Apply step angle to trend lines
if bar_index % n == 0 and trend
multi1 := 0
multi2 += step
band += distance1 * multi2
if bar_index % n == 0 and not trend
multi1 += step
multi2 := 0
band -= distance1 * multi1
// Smooth the band
Sband = ta.sma(band, n)
// Set color based on trend
color = trend ? #54b6d4 : #cf2b2b
// Calculate upper and lower bands
band_upper = ta.sma(band + distance*0.5, n)
band_lower = ta.sma(band - distance*0.5, n)
band1 = trend ? band_upper : band_lower
// --------------------------------------------------------------------------------------------------------------------}
// 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// --------------------------------------------------------------------------------------------------------------------{
// Plot the outer band
plot(band1, color = bar_index % 2 == 0 ? color.new(chart.fg_color, 50) : na)
// Plot the main band and fill area
p1 = plot(ta.change(trend) ? na : Sband, style = plot.style_linebr, color = color.gray)
p2 = plot(ta.sma(hl2, 20), display = display.none)
fill(p1, p2, band, ta.sma(hl2, 20), color.new(color, 60), na)
// --------------------------------------------------------------------------------------------------------------------}
2024-10-26
644
글번호 184631
지표