커뮤니티
수식수정부탁드립니다
2019-09-30 12:18:44
235
글번호 132365
input : sig(5),카운팅시작일자(20190916), 카운팅시작시간(070000),n(0);
var : OBVv(0),OBVs(0),OBVo(0);
var : XClose(0),Xopen(0),Xhigh(0),Xlow(0),Tcond(false);
if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then
Tcond = true;
{
OBvv = OBV;
OBVs = ma(OBVv,sig);
OBVo = OBVv-OBVs;
xClose = (Open+High+Low+Close)/4;
if CurrentBar <= 1 Then
Xopen = (O+C)/2;
Else
xOpen = (XOpen[1] + xClose[1])/2;
xHigh = Max(High, xOpen, xClose);
xLow = Min(Low, xOpen, xClose);
var1=xHigh;
var2=xLow;
var3=xHigh-xLow;
If var3 >= 0 Then
{
plot12(var1, "중심상",red);
}
Else
{
Plot22(var2, "중심하",blue);
}}
상기수식을 당일날자만 나오게 수정 부탁드립니다
그림은 상기수식을 적용하니
날자 적용이 안됩니다 그리고 그림과같이 당일 시가를 보조지표(녹색수평선)에 넣을수있으면 좋겠습니다
부탁드립니다
- 1. 132981_캡처.JPG (0.05 MB)
답변 1
예스스탁 예스스탁 답변
2019-10-01 13:20:24
안녕하세요
예스스탁입니다.
input : sig(5),카운팅시작일자(20191001),카운팅시작시간(070000),n(0);
var : OBVv(0),OBVs(0),OBVo(0);
var : XClose(0),Xopen(0),Xhigh(0),Xlow(0),Tcond(false),DO(0);
if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then
Tcond = true;
OBvv = OBV;
OBVs = ma(OBVv,sig);
OBVo = OBVv-OBVs;
xClose = (Open+High+Low+Close)/4;
if CurrentBar <= 1 Then
Xopen = (O+C)/2;
Else
xOpen = (XOpen[1] + xClose[1])/2;
xHigh = Max(High, xOpen, xClose);
xLow = Min(Low, xOpen, xClose);
var1=xHigh;
var2=xLow;
var3=xHigh-xLow;
if Tcond == true then
{
if bdate != bdate[1] Then
DO = Xopen;
If var3 >= 0 Then
{
plot12(var1, "중심상",red);
}
Else
{
Plot22(var2, "중심하",blue);
}
plot3(DO);
}
즐거운 하루되세요
> 수색대대 님이 쓴 글입니다.
> 제목 : 수식수정부탁드립니다
> input : sig(5),카운팅시작일자(20190916), 카운팅시작시간(070000),n(0);
var : OBVv(0),OBVs(0),OBVo(0);
var : XClose(0),Xopen(0),Xhigh(0),Xlow(0),Tcond(false);
if sdate >= 카운팅시작일자 and stime >= 카운팅시작시간 Then
Tcond = true;
{
OBvv = OBV;
OBVs = ma(OBVv,sig);
OBVo = OBVv-OBVs;
xClose = (Open+High+Low+Close)/4;
if CurrentBar <= 1 Then
Xopen = (O+C)/2;
Else
xOpen = (XOpen[1] + xClose[1])/2;
xHigh = Max(High, xOpen, xClose);
xLow = Min(Low, xOpen, xClose);
var1=xHigh;
var2=xLow;
var3=xHigh-xLow;
If var3 >= 0 Then
{
plot12(var1, "중심상",red);
}
Else
{
Plot22(var2, "중심하",blue);
}}
상기수식을 당일날자만 나오게 수정 부탁드립니다
그림은 상기수식을 적용하니
날자 적용이 안됩니다 그리고 그림과같이 당일 시가를 보조지표(녹색수평선)에 넣을수있으면 좋겠습니다
부탁드립니다