답변완료
도움 요청합니다.
안녕하세요?
아래 수식에서 장 시작과 함께 나타나는 타주기 2일선 시작 추세선 기준으로 +- 1.25와 1.5의 채우기, 2.5와 3.0의 채우기를 위, 아래로 하려하는데 안됩니다. ㅜㅜ
도와주세요
다른 함수라도 좋습니다.
오늘도 좋은시간 그득하시길 바랍니다.
========
input : p(2),pt1(1.25),pt2(1.5);
input : 굵기1(5),R1(255),G1(0),B1(0);
input : 굵기2(5),R2(255),G2(0),B2(0);
input : 굵기3(5),R3(255),G3(0),B3(0);
input : 굵기4(5),R4(255),G4(0),B4(0);
input : 굵기5(5),R5(255),G5(0),B5(0);
var : cnt(0),sum(0),mav(0);
var : TL1(0),TL2(0),TL3(0),TL4(0),TL5(0);
sum = DayOpen(0);
if P >= 2 Then
{
For cnt = 1 to P-1
{
sum = sum + DayClose(cnt);
}
}
mav = sum/P;
if Index == 0 or (sTime >= 152000 and sTime[1] < 152000) Then
{
var1 = sDate;
Var2 = stime;
}
if Bdate != Bdate[1] Then
{
if var1 > 0 and Var2 > 0 Then
{
TL1 = TL_New(var1,Var2,mav,sDate,sTime,mav);
TL2 = TL_New(var1,Var2,mav+pt1,sDate,sTime,mav+pt1);
TL3 = TL_New(var1,Var2,mav-pt2,sDate,sTime,mav-pt1);
TL4 = TL_New(var1,Var2,mav+pt2,sDate,sTime,mav+pt2);
TL5 = TL_New(var1,Var2,mav-pt2,sDate,sTime,mav-pt2);
TL_SetColor(TL1,RGB(R1,G1,B1));
TL_SetColor(TL2,RGB(R2,G2,B2));
TL_SetColor(TL3,RGB(R3,G3,B3));
TL_SetColor(TL4,RGB(R4,G4,B4));
TL_SetColor(TL5,RGB(R5,G5,B5));
TL_SetSize(TL1, 굵기1);
TL_SetSize(TL2, 굵기2);
TL_SetSize(TL3, 굵기3);
TL_SetSize(TL4, 굵기4);
TL_SetSize(TL5, 굵기5);
}
}
Else
{
if sTime < 150000 Then
{
TL_SetBegin(TL1,var1,Var2,mav);
TL_SetEnd(TL1,sDate,sTime,mav);
TL_SetBegin(TL2,var1,Var2,mav+pt1);
TL_SetEnd(TL2,sDate,sTime,mav+pt1);
TL_SetBegin(TL3,var1,Var2,mav-pt1);
TL_SetEnd(TL3,sDate,sTime,mav-pt1);
TL_SetBegin(TL4,var1,Var2,mav+pt2);
TL_SetEnd(TL4,sDate,sTime,mav+pt2);
TL_SetBegin(TL5,var1,Var2,mav-pt2);
TL_SetEnd(TL5,sDate,sTime,mav-pt2);
}
}
2023-03-21
1675
글번호 167392
지표
답변완료
신호 수식입니다. 이것을 조건검색식으로 종목검색이 가능할지 문의 드립니다.
A=BBandsUp(17,2);
B=BBandsUp(40,2);
D=Disparity(20);
E=EnvelopeUP(20,6);
P=EnvelopeUp(50,3);
c>SAR(0.015,0.15) and
DIPlus(14)>=DIMinus(14) and
(o<c and c>P(19) and D<150 and D>D(1) and
((c>ma(h,5) and Crossup(A,E))
or
(c>ma(h,5) and B>E and A(1)<B(1) and CrossUp(A,B))
or
(A>B and B>E and CrossUp(C,A))
or
(CrossUp(C,A) and CrossUp(C,E))
or
(CrossUp(C,A) and CrossUp(C,B) and
CrossUp(C,E))))
or
(o<c and c<P(19) and D>D(1) and v>ma(v,5)*2 and
((c>ma(h,5) and Crossup(A,E))
or
(c>ma(h,5) and B>E and A(1)<B(1) and CrossUp(A,B))
or
(A>B and B>E and CrossUp(C,A))
or
(CrossUp(C,A) and CrossUp(C,E))
or
(CrossUp(C,A) and CrossUp(C,B) and
CrossUp(C,E))))
2023-03-21
2437
글번호 167386
종목검색
답변완료
수식작성 부탁드립니다.
안녕하세요. 운영자님
아래와 같은 트레이딩뷰 수식을 예스트레이더 수식으로 변환 부탁드립니다.
감사합니다.
// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0/
// © LuxAlgo
//@version=5
indicator("Squeeze Index [LuxAlgo]", "Squeeze Index [LuxAlgo]")
//------------------------------------------------------------------------------
//Settings
//-----------------------------------------------------------------------------{
conv = input(50, 'Convergence Factor')
length = input(20)
src = input(close)
//Style
col_0 = input(#ffeb3b, 'Gradient'
, inline = 'inline0'
, group = 'Style')
col_1 = input(#ff5d00, ''
, inline = 'inline0'
, group = 'Style')
col_2 = input(#ff1100, ''
, inline = 'inline0'
, group = 'Style')
//-----------------------------------------------------------------------------}
//Squeeze index
//-----------------------------------------------------------------------------{
var max = 0.
var min = 0.
max := nz(math.max(src, max - (max - src) / conv), src)
min := nz(math.min(src, min + (src - min) / conv), src)
diff = math.log(max - min)
psi = -50 * ta.correlation(diff, bar_index, length) + 50
//-----------------------------------------------------------------------------}
//Plots
//-----------------------------------------------------------------------------{
css1 = color.from_gradient(psi, 0, 80, col_0, col_1)
css2 = color.from_gradient(psi, 80, 100, css1, col_2)
plot_0 = plot(psi, 'PSI', psi > 80 ? na : css2)
plot(psi, 'Dots', psi > 80 ? css2 : na, style = plot.style_cross)
plot_1 = plot(80, display = display.none, editable = false)
fill(plot_0, plot_1, psi < 80 ? na : color.new(#ff1100, 80))
hline(80)
//-----------------------------------------------------------------------------}
2023-03-21
2374
글번호 167384
지표
답변완료
수식작성 부탁드립니다.
안녕하세요. 운영자님
아래와 같은 트레이딩뷰 수식을 예스트레이더 수식으로 변환 부탁드립니다.
감사합니다.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Shuttle_Club
//@version=4
study('Volume fight')
ma = input(24, 'Search_range', minval=1,tooltip='The range of estimation of the predominance of bullish or bearish volume (quantity bars). The smaller the TF, the higher the range value should be used to filter out false signals.₩n₩nДиапазон оценки преобладания бычьего или медвежьего объема (количество баров). Чем меньше ТФ, тем выше следует использовать значение диапазона, чтобы отфильтровать ложные сигналы.')
delta = input(15, 'Smoothing_for_flat,%', step=0.5, minval=0,tooltip='Smoothing to reduce false signals and highlight the flat zone. If you set the percentage to zero, the flat zones will not be highlighted, but there will be much more false signals, since the indicator becomes very sensitive when the smoothing percentage decreases.₩n₩nСглаживание для уменьшения ложных сигналов и выделения зоны флета. Если выставить процент равным нулю, то зоны флета выделяться не будут, но будет гораздо больше ложных сигналов, так как индикатор становится очень чувствительным при снижении процента сглаживания')
bgshow = input(false, 'Show background zones',tooltip='Show the color background of the current trading zone.₩n₩nПоказывать цветовой фон текущей торговой зоны.')
all_signal_show = input(false, 'Show each setup in zone',tooltip='Show and use signals every time in trading zone.₩n₩nПоказывать и использовать каждый сигнал в торговой зоне.')
///// CALCULATION
bull_vol = open<close ? volume : volume*(high-open)/(high-low) //determine the share of bullish volume
bear_vol = open>close ? volume : volume*(open-low)/(high-low) //determine the share of bearish volume
avg_bull_vol = vwma(bull_vol,ma), avg_bear_vol = vwma(bear_vol,ma) //determine vwma
diff_vol = sma((avg_bull_vol/volume-1)-(avg_bear_vol/volume-1),ma) //normalize and smooth the values
vol_flat = abs(avg_bull_vol+avg_bear_vol)/2 //determine average value for calculation flat-filter
///// SIGNALS
up = int(na), up := nz(up[1]), dn = int(na), dn := nz(dn[1]) //variables
bull = avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) //determine up zones
bear = avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) //determine dn zones
if bull
up += 1, dn := 0
if bear
dn += 1, up := 0
if not bull and not bear and all_signal_show
up :=0, dn := 0
alertcondition(bull and up==1,'UP','UP - Bullish movement') //UP - alert
alertcondition(bear and dn==1,'DN','DN - Bearish movement') //DN - alert
///// PLOTTING
plotshape(bull and up==1, 'UP', location=location.bottom, style = shape.triangleup, color=color.green, size=size.tiny)
plotshape(bear and dn==1, 'DN', location=location.top, style = shape.triangledown, color=color.red, size=size.tiny)
bgcolor(title='Trading zones',color = bgshow and avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) ? color.new(color.green,85) : bgshow and avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) ? color.new(color.red,85) : na)
plot(diff_vol, 'Volume difference', style=plot.style_area, color = avg_bull_vol>avg_bear_vol and vol_flat/avg_bull_vol<(1-delta/100) ? color.new(color.green,0) : avg_bull_vol<avg_bear_vol and vol_flat/avg_bear_vol<(1-delta/100) ? color.new(color.red,0) : color.new(color.gray,50))
2023-03-21
2617
글번호 167382
지표