답변완료
항상 죄송스럽네요 지표변환 부탁드려요 건강하세요
항상 감사하고 있습미다 건강하세요
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ceyhun
//@version=4
study("Top Bottom Indicator",overlay=false)
per = input(14, title="Bottom Period")
loc = low < lowest(low[1], per) and low <= lowest(low[per], per)
bottom = barssince(loc)
plot(bottom,color=color.blue)
per2 = input(14, title="Top Period")
loc2 = high > highest(high[1], per2) and high >= highest(high[per2], per2)
top = barssince(loc2)
plot(top,color=color.red)
Buy = crossover(bottom,top)
Sell = crossunder(bottom,top)
plotshape(Buy,title="Buy", style=shape.triangleup,location=location.bottom, color=#008000, text="Buy",size=size.tiny)
plotshape(Sell,title="Sell",style=shape.triangledown,location=location.top, color=#FF0000, text="Sell",size=size.tiny)
background = top < bottom ? color.new(#0000FF,80) : top > bottom ? color.new(#FF0000,80) : na
bgcolor(color=background)
alertcondition(Buy, title="Buy Signal", message="Buy")
alertcondition(Sell, title="Sell Signal", message="Sell")
2025-06-04
159
글번호 191417
지표
답변완료
문의 드립니다.
지표 색상 분리 문의 드립니다.
수고하세요
INPUT:P1(1), TH(1.5),P2(2);
VAR: TRV(0), BULL(0), BEAR(0), BULLP(0), BEARP(0),BPO(0);
TRV= V/ATR(P1);
BULL =
Iff( C < O, Iff( C[1] < O, Max( H - C[1], C - L ), Max( H - O, C - L ) ),
Iff( C > O, Iff( C[1] > O, H - L, Max( O - C[1], H - L ) ),
Iff( H - C > C - L, Iff( C[1] < O, Max( H - C[1], C - L ), H - O ),
Iff( H - C < C - L, Iff( C[1] > O, H - L, Max( O - C[1], H - L ) ),
Iff( C[1] > O, Max( H - O, C - L ),
Iff( C[1] < O, Max( O - C[1], H - L ), H - L ) ) ) ) ) );
BEAR =
Iff( C < O,
Iff( C[1] > O, Max( C[1] - O, H - L ), H-L ),
Iff( C > O, Iff( C[1] > O, Max( C[1] - L, H - C ),Max( O - L, H - C ) ),
Iff( H - C > C - L, Iff( C[1] > O, Max( C[1] - O, H - L ),H - L ),
Iff( H - C < C - L,Iff( C[1] > O, Max( C[1] - L, H - C ),O - L ),
Iff( C[1] > O, Max( C[1] - O, H - L ),
Iff( C[1] < O,Max( O - L, H - C ), H - L ) ) ) ) ) ) ;
BULLP=MA(BULL,P2);
BEARP=MA(BEAR,P2);
BPO=BULLP/BEARP ;
PLOT1(BEARP, "매도");
PLOT2(BULLP, "매수");
IF TRV[1]>0 AND TRV/TRV[1]>TH AND BPO<1 THEN PLOT3(BULLP, "매수 대기신호");
IF TRV[1]>0 AND TRV/TRV[1]>TH AND BPO>1 THEN PLOT4(BEARP, "매도 대기신호");
PlotBaseLine1(0.05000);
PlotBaseLine2(0.04000);
PlotBaseLine3(0.06000);
2025-06-04
205
글번호 191394
지표
답변완료
질문 부탁드립니다
답변 감사합니다
condition 을 초기화 할때 일반적인 변수 초기화처럼 아래와 같이 작성하는게 맞나요??
if (h>l*1.08) then
{
...
condition1=false;
if h>aa[0] Then condition1=true;
}
else
{
condition2=false;
if h>aa[0]*1.1 Then condition2=true;
}
if Bdate != Bdate[1] Then
Condition3 = False;
if condition3==False and condition1==true and condition2==true Then
{
condition3=true;
find(1)
}
그리고 수식 작성시에 순서에 대해서 궁금한데요
예를들어
t1=7;
t2=3;
tttl1[0] = TL_New(sd[t1],st[t1],aa[t1],sd[t2],st[t2],aa[t2]);
이렇게와
tttl1[0] = TL_New(sd[t1],st[t1],aa[t1],sd[t2],st[t2],aa[t2]);
t1=7;
t2=3;
이렇게 작성해도 결과는 같은데, 수식은 작성하는 순서가 위에서 아래로 읽어 나가지 않나요?
그럼
if aa[0] >= aa[1]*1.10 Then aa[0] = aa[0]*0.9;
For cnt = 1 to (var1-Var2)
{
sum1=sum1+l[cnt];
sumi1=sumi1+1;
}
value1=sum1/sumi1;
For cnt = 49 DownTo 1
{
aa[cnt] = aa[cnt-1];
}
aa[0] = value1;
위 식에서 처럼 작성해도 되는건지, 아니면 순서대로 (배열 aa 를 먼저 규정) 해야되는건지 궁금합니다. 어떤 경우에는 순서가 중요한건지 궁금합니다
감사합니다
2025-06-04
169
글번호 191393
지표