답변완료
시스템식 수정 문의드립니다
조건 c를 추가했습니다
감사합니다
------------------------------------------
안녕하세요
예스스탁입니다.
var : DM(0);
var : A1(0),AA(0),BB(0),DD(0);
A1=min(DayLow(), Dayclose(1));
AA = DayHigh() - A1;
BB = AA * 0.6;
DD = A1 + BB;
if Bdate != Bdate[1] Then
{
DM = 0;
Condition1 = False;
}
DM = DM+M;
if Condition1 == False and DayHigh >= DayClose(1)*1.07 Then
{
Condition1 = true;
var1 = H;
}
if sTime >= 101200 and
Condition1 == true and
DM >= 58000000000 and
crossup(h,var1) Then
Buy();
if CrossDown(C,DD) Then
ExitLong("bx");
즐거운 하루되세요
> kosto1 님이 쓴 글입니다.
> 제목 : 시스템식 문의드립니다
> 다음의 조건을 만족하는 시스템식을 문의드립니다
감사합니다!
당일 거래대금 580억 이상
적용 대상 1분봉
a : 전일 종가대비 당일 최고 고가 7% 이상
b: 1분봉상 a를 1012분 이후에 고가 돌파
c: b가 당일 신고가갱신
매도
키움에서 쓰던 수식입니다
D를 이탈시 매도
A1=min(DayLow(), PreDayclose());
A = DayHigh() - A1;
B = A * 0.6;
D = A1 + B;
D
당일 매도가 안되어
다음날로 넘어가면 다음날 새로 생긴 매도기준을
이탈하면 매도하는 방식입니다
2021-07-30
783
글번호 151201
시스템
답변완료
수식 변환 부탁드립니다
안녕하세요
더운날씨에 수고가 많으십니다.
아래 지표는 트레이딩뷰의 슈퍼트렌드라는 지표인데 소개로 알게되어 예스의 지표로
접목하고자 합니다.
1.내용을 잘 몰라서 어떤 변수를 어떻게 활용해야 하는지 알려주시면 감사하겠습니다.
//@version=2
//oringan. it is from superTrend. i modified manything.
//recommand 4hour candle only.
study("Supertrend Buy or Sell Signal oringan v0.3", overlay = true)
Factor=input(4, minval=1,maxval = 111, title="Factor(height). 4h 4 / 30m 7")
Pd=input(13, minval=1,maxval = 111, title="Period(length) 4h 13 / 30m 7")
highPd = input(8, minval=1, maxval=1111, title="RedLine./ 4h 8 / 30m 33")
lowPd = input(5, minval=1, maxval=1111, title="GreenLine. 4h 5 / 30m 33")
sp = hlc3//
th=high
for i=1 to Pd*highPd
if th < high[i]
th := high[i]
ll = low
for i=1 to Pd*lowPd
if ll > low[i]
ll := low[i]
myh = sma(high,Pd)*0.4+th*0.6
//myl = (sma(low,Pd)*0.4+ll*0.3+th*0.2)
myl = (sma(hlc3,Pd)*0.5+ll*0.5)
Up=myl-(Factor*atr(Pd)*0.8 )
Dn= (myh+(Factor*atr(Pd) ))
//if myl1 > myl2*1.03 //is rising
// Up := Up*0.95
//if myl1 < myl2*0.98//is falling
// Up := Up*1.1
//Dn := Dn*1.15
TrendUp=sp[1]>TrendUp[1]? max(Up,TrendUp[1]) : Up
TrendDown=sp[1]<TrendDown[1]? min(Dn,TrendDown[1]) : Dn
Trend = sp > TrendDown[1] ? 1: sp< TrendUp[1]? -1: nz(Trend[1],1)
//Trend = high > TrendDown[1] ? 1: low< TrendUp[1]? -1: nz(Trend[1],1) //stop limit mode
Tsl = Trend==1? TrendUp: TrendDown
linecolor = Trend == 1 ? green : red
plot(Tsl, color = linecolor , style = line , linewidth = 2,title = "SuperTrend")
plotshape(cross(sp,Tsl) and sp>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross(Tsl,sp) and sp<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-07-30
2399
글번호 151196
지표