답변완료
도움 요청합니다.
안녕하세요?
아래 수식에서 장 시작과 함께 나타나는 타주기 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
1689
글번호 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
2455
글번호 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
2398
글번호 167384
지표