답변완료
부탁합니다
h = input(5.,'Bandwidth')
src = input(close,'Source')
//----
n = bar_index
var ln = array.new_line(0)
if barstate.isfirst
for i = 0 to 499
array.push(ln,line.new(na,na,na,na))
//----
float y2 = na
float y1 = na
float y1_d = na
//----
line l = na
label lb = na
if barstate.islast
for i = 0 to min(499,n-1)
sum = 0.
sumw = 0.
for j = 0 to min(499,n-1)
w = exp(-(pow(i-j,2)/(h*h*2)))
sum += src[j]*w
sumw += w
y2 := sum/sumw
d = y2 - y1
l := array.get(ln,i)
line.set_xy1(l,n-i+1,y1)
line.set_xy2(l,n-i,y2)
line.set_color(l,y2 > y1 ? #ff1100 : #39ff14)
line.set_width(l,2)
if d > 0 and y1_d < 0
label.new(n-i+1,src[i],'▲',color=#00000000,style=label.style_label_up,textcolor=#39ff14,textalign=text.align_center)
if d < 0 and y1_d > 0
label.new(n-i+1,src[i],'▼',color=#00000000,style=label.style_label_down,textcolor=#ff1100,textalign=text.align_center)
y1 := y2
y1_d := d
상기수식을 예스수식으로 부탁드립니다.
선의 색상이나 긁기를 조절할수있게 부탁합니다.
2022-05-06
1107
글번호 158604
지표
답변완료
시스템식으로부탁드립니다
vars: xClose(0),xOpen(0),xHigh(0),xLow(0),t(0);
var : PD(0),PT(0),PH(0),ND(0),NT(0),NL(0),TL(0),tX1(0),TX2(0);
if index == 0 then
{
xOpen = open;
xClose = (O+H+L+C)/4;
xHigh = MaxList( high, xOpen, xClose);
xLow = MinList( low, xOpen,xClose);
}
else
{
xClose = (O+H+L+C)/4;
xOpen = (xOpen [1] + xClose [1])/2 ;
xHigh = MaxList(High, xOpen, xClose) ;
xLow = MinList(Low, xOpen, xClose) ;
}
if xClose > xOpen then
{
PlotPaintBar(Xhigh,Xlow,Xopen,Xclose,"강조",red);
}
else if xClose < xOpen then
{
PlotPaintBar(Xhigh,Xlow,Xopen,Xclose,"강조",blue);
}
else
PlotPaintBar(Xhigh,Xlow,Xopen,Xclose,"강조",GREEN);
2022-05-05
1309
글번호 158601
시스템
답변완료
수식부탁드리겠습니다
조건에따라 수량은 다르게 진입했다면
트레일링스탑기능을 사용할때 1계약 기준으로 청산이 이루어지는데
계약수에 따른 트레일링스탑기능을 사용할수있게 부탁드립니다 .
아래는 제가 설정한 수식입니다
어느 부분에 문제가있는지 확인부탁드립니다
/////////////////////////////////////////////////////////////////////////////
Inputs: bf(10), af(5),bf1(20), af1(10);
if 1계약진입조건 Then
Begin
SetStopContract; // 진입건 별
SetStopTrailing( af, bf, PointStop, 1 );
End
Else if 2계약 진입조건 Then
Begin
SetStopContract; // 진입건 별
SetStopTrailing( af1, bf1, PointStop, 1 );
End;
2022-05-04
1419
글번호 158596
시스템
답변완료
PlaySound
다음과 같이 실행하여보면, alert는 제대로 나오나, 사운드는 원하는 사운드가 안나오고, 그냥 윈도우의 단순한 소리만 지속 나옵니다. 특별할게 아무것도 없고, 예스의 질문들을 다 확인해봤고, 틀린게 없는지 확인하고 아무리 바꾸어 시도해봐도 안되네요.
중간의 ₩는 역슬래시로 랭귀지에서는 되어있습니다. 도움을 부탁드립니다.
input :AvgLen(10);
if Close>ma(c,AvgLen) Then
{
alert("가격 %.2f 이평Up돌파 %.2f",C,ma(c,AvgLen));
PlaySound("C:₩Sound₩SOUND1.wav");
}
if Close<ma(c,AvgLen) Then
{
alert("가격 %.2f 이평Dn돌파 %.2f",C,ma(c,AvgLen));
PlaySound("C:₩Sound₩SOUND1.wav");
}
plot1(ma(c,AvgLen));
2022-05-04
1874
글번호 158595
지표