답변완료
문의드립니다
항상 도움주심에 감사드립니다^^
아래 수식을 예스트레이더로 변환하여 적용이 가능한지요?
부탁드립니다^&^
plotshape(cross(close,Tsl) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross(Tsl,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)
//plot(Trend==1 and Trend[1]==-1,color = linecolor, style = circles, linewidth = 3,title="Trend")
plotarrow(Trend == 1 and Trend[1] == -1 ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)
plotarrow(Trend == -1 and Trend[1] == 1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)
2021-12-08
860
글번호 154285
지표
답변완료
만기일기준 지수갭기준 통합
만기기준일 수식을 아래 수식과 결합하여 주십시요
단순 결합은 Month(0)과 month(0,Data2) 이미 선언된 이름을 다시 선언하는 오류가 뜹니다.
수식작동은
만기기준으로 특정일 and 지수갭으로 특정 레인지일 때 d3 상승이면 buy 입니다.
input:만기기준일(0);
Var : Year(0),Month(0),ndate1(0),ndate2(0);
var : cnt(0),count1(0),count2(0);
var : XD1(0),XD2(0),Xdate(0),remain(0);
Year = Floor(sDate / 10000)*10000;
month = Floor(FracPortion(sdate/10000)*100)*100;
ndate1 = year+month+1;
if Month+100 <= 1200 Then
ndate2 = year+(month+100)+1;
Else
ndate2 = (year+10000)+100+1;
count1 = 0;
count2 = 0;
for cnt = 0 to 15
{
if dayofweek(ndate1+cnt) == 4 Then
{
count1 = count1+1;
if count1 == 2 Then
{
XD1 = ndate1+cnt;
}
}
if dayofweek(ndate2+cnt) == 4 Then
{
count2 = count2+1;
if count2 == 2 Then
{
XD2 = nDate2+cnt;
}
}
}
if sDate <= XD1 Then
{
Xdate = XD1;
}
Else
{
Xdate = XD2;
}
if Xdate > 0 Then
{
remain = DateToJulian(Xdate)-DateToJulian(sDate);
}
if remain == 만기기준일 then
{
}
**********************************************************************************
input: 지수갭1(10),지수갭2(-10);
input: d3상승(1000);
var : month(0,Data2),nday(0,Data2),week(0,data2);
var : X(False,Data2),cond(False,Data2);
var : DD(0,Data2),C2(0,Data2);
month = data2(int(date/100)-int(date/10000)*100);
nday = data2(date - int(date/100)*100);
Week = data2(DayOfWeek(date));
#옵션만기일
if (nday >= 8 and nday <= 14 and week == 4) then
X = true;
Else
X = False;
if data2(bdate != Bdate[1]) Then
{
if X == false and X[1] == true Then
{
C2 = 0;
cond = true;
dd = 0;
}
if cond ==true Then
dd = dd+1;
}
#만기다음날 Data2 종가
if cond == true and dd == 1 Then
C2 = data2(C);
if dd > 1 and C2 > 0 and 지수갭1 > Data2(Opend(0)-C2) and Data2(Opend(0)-C2) > 지수갭2 and Data3(c > Lowd(0)+d3상승) Then
Buy();
2021-12-16
1001
글번호 154276
시스템