커뮤니티

예스랭귀지 Q&A

글쓰기

우유 님에 의해서 삭제되었습니다.

프로필 이미지
우유
2025-05-22
15
글번호 191056
시스템
답변완료

추가분봉 데이터영역 문의

안녕하세요 건수를 적게잡고 종목추가를 하면 빠르게추가돼고 건수를 1000이상 설정하면 너무 오래걸립니다 제공돼는 건수가 10000바로 알고있읍니다 동일한 차트영역에 1분봉,60분봉 ,120분봉추가하는데 data봉이 너무늦게열립니다 주기차이가 있어 늦게열리는가 봅니다 시스템트레이딩할때 바 건수는 상관없나요 수식에 data 건수를 삽입가능하신지 문의 드립니다 input : short(12),long(26),sig(9),신고신저기간(100),최근N봉(20); input : 진입시작시간(230000),당일청산시간(020000),손절틱(100),감시틱(70),되돌림틱(20); var : S1(0),D1(0),TM(0),EP1(0),EP2(0),EP3(0); var : macdv(0,Data1),macds(0,Data1); var : macdv1(0,Data2),macds1(0,Data2); var : macdv2(0,Data3),macds2(0,Data3); var : NH(False,Data1),NL(False,Data1); macdv = data1(macd(short,long)); macds = data1(Ema(macdv,sig)); macdv1 = data2(macd(short,long)); macds1 = data2(Ema(macdv1,sig)); macdv2 = data3(macd(short,long)); macds2 = data3(Ema(macdv2,sig)); NH = Data1(CountIf(H > highest(H,신고신저기간)[1],최근N봉) >= 1); NL = Data1(countif(L < lowest(L,신고신저기간)[1],최근N봉) >= 1); if sDate != sDate[1] Then SetStopEndofday(당일청산시간); if Bdate != Bdate[1] Then SetStopEndofday(0); var : Tcond(False); if (sdate != sDate[1] and sTime >= 당일청산시간) or (sdate == sDate[1] and sTime >= 당일청산시간 and sTime[1] < 당일청산시간) Then Tcond = false; if (sdate != sDate[1] and sTime >= 진입시작시간) or (sdate == sDate[1] and sTime >= 진입시작시간 and sTime[1] < 진입시작시간) Then Tcond = true; if Tcond == true Then { if MarketPosition <= 0 and NL == true and CrossUp(MACDV,0) and MACDV1 > 0 and MACDV2 > 0 and macdv > macds and macdv1 > macds1 and macdv2 > macds2 Then Buy("b"); if MarketPosition >= 0 and NH == true and CrossDown(MACDV,0) and MACDV1 < 0 and MACDV2 < 0 and macdv < macds and macdv1 < macds1 and macdv2 < macds2 Then Sell("s"); if MarketPosition == 1 and (CrossDown(MACDV1,MACDS1) or CrossDown(MACDV2,MACDS2)) Then ExitLong("bx"); if MarketPosition == -1 and (CrossUp(MACDV1,MACDS1) or CrossUp(MACDV2,MACDS2)) Then ExitShort("sx"); if MarketPosition == 1 Then { if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*감시틱 Then ExitLong("btrx",AtStop,highest(H,BarsSinceEntry)-PriceScale*되돌림틱); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*감시틱 Then ExitShort("strx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*되돌림틱); } } SetStopLoss(PriceScale*손절틱,PointStop); 감사합니다
프로필 이미지
주꼬보이
2025-05-21
201
글번호 191055
시스템
답변완료

부탁드립니다

수고하십니다 아래수식을 예스로 부탁드립니다 //@version=2 study("Fractal Adaptive Moving Average",shorttitle="FRAMA",overlay=true) price = input(hl2) len = input(defval=10,minval=1) FC = input(defval=1,minval=1) SC = input(defval=150,minval=1) len1 = len/2 w = log(2/(SC+1)) H1 = highest(high,len1) L1 = lowest(low,len1) N1 = (H1-L1)/len1 H2 = highest(high,len)[len1] L2 = lowest(low,len)[len1] N2 = (H2-L2)/len1 H3 = highest(high,len) L3 = lowest(low,len) N3 = (H3-L3)/len dimen1 = (log(N1+N2)-log(N3))/log(2) dimen = iff(N1>0 and N2>0 and N3>0,dimen1,nz(dimen1[1])) alpha1 = exp(w*(dimen-1)) oldalpha = alpha1>1?1:(alpha1<0.01?0.01:alpha1) oldN = (2-oldalpha)/oldalpha N = (((SC-FC)*(oldN-1))/(SC-1))+FC alpha_ = 2/(N+1) alpha = alpha_<2/(SC+1)?2/(SC+1):(alpha_>1?1:alpha_) out = (1-alpha)*nz(out[1]) + alpha*price plot(out,title="FRAMA",color=blue,transp=0)
프로필 이미지
파생돌이
2025-05-21
209
글번호 191054
지표
답변완료

문의드립니다

var : tx(0); Text_Delete(tx); tx = Text_New(NextBarSdate,NextBarStime,NextBarOpen,NumToStr(NextBarOpen,2)); Text_SetStyle(tx,0,0); ============== 참조종목 분봉시가표시 수식 좀 알려주세요 감사합니다
프로필 이미지
러블리
2025-05-21
239
글번호 191046
지표
답변완료

문의드립니다.

아래의 트레이딩뷰 수식을 변환부탁드립니다. =========================== // Settings - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - supertrendAtrPeriod &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;=input.int (defval =10 ,step =1 ,title ="ATR Length",group ="Supertrend") supertrendAtrMultiplier &#160;&#160;&#160;&#160;&#160;&#160;=input.float (defval =2.7 ,step =0.1 ,title ="ATR Multiplier",group ="Supertrend") // &#160;Heikin Ashi Candles haOpen =request.security (ticker.heikinashi (syminfo.tickerid ),timeframe.period ,open ) haHigh =request.security (ticker.heikinashi (syminfo.tickerid ),timeframe.period ,high ) haLow =request.security (ticker.heikinashi (syminfo.tickerid ),timeframe.period ,low ) haClose =request.security (ticker.heikinashi (syminfo.tickerid ),timeframe.period ,close ) plotcandle (haOpen <haClose ?haOpen :na ,haHigh ,haLow ,haClose ,title ='Green Candles',color =green ,wickcolor =green ,bordercolor =green ,display =display.pane ) plotcandle (haOpen >=haClose ?haOpen :na ,haHigh ,haLow ,haClose ,title ='Red Candles',color =red ,wickcolor =red ,bordercolor =red ,display =display.pane ) plot (display =display.status_line ,series =haOpen ,color =green ) plot (display =display.status_line ,series =haHigh ,color =green ) plot (display =display.status_line ,series =haLow ,color =red ) plot (display =display.status_line ,series =haClose ,color =red ) // &#160;HA Supertrend haTrueRange =request.security (ticker.heikinashi (syminfo.tickerid ),timeframe.period ,ta.atr (supertrendAtrPeriod ))// math.max(haHigh - haLow, math.abs(haHigh - haClose[1]), math.abs(haLow - haClose[1])) haSupertrendUp =((haHigh +haLow )/2 )-(supertrendAtrMultiplier *haTrueRange ) haSupertrendDown =((haHigh +haLow )/2 )+(supertrendAtrMultiplier *haTrueRange ) float trendingUp =na float trendingDown =na direction =0 trendingUp :=haClose [1 ]>trendingUp [1 ]?math.max (haSupertrendUp ,trendingUp [1 ]):haSupertrendUp trendingDown :=haClose [1 ]<trendingDown [1 ]?math.min (haSupertrendDown ,trendingDown [1 ]):haSupertrendDown direction :=haClose >trendingDown [1 ]?1 :haClose <trendingUp [1 ]?-1 :nz (direction [1 ],1 ) supertrend =direction ==1 ?trendingUp :trendingDown supertrendUp =ta.change (direction )<0 supertrendDown =ta.change (direction )>0 // &#160;Plots, Lines, and Labels bodyMiddle =plot ((haOpen +haClose )/2 ,display =display.none ) downTrend =plot (direction <0 ?supertrend :na ,"Down Trend",color =red ,style =plot.style_linebr ) upTrend =plot (direction <0 ?na :supertrend ,"Up Trend",color =green ,style =plot.style_linebr ) fill (bodyMiddle ,upTrend ,lightGreen ,fillgaps =false ) fill (bodyMiddle ,downTrend ,lightRed ,fillgaps =false ) ========================= 첨부된 그림처럼 빨강선과 녹색선을 표현하고자 합니다. atr길이와 atr배수을 변경할수 있게 부탁드립니다. 수식이 길어서 전략은 삭제하고 라인만 나타나보이게 올렸으니 감안하여 부족한 부분이 있다면 보완해주셔서 변환해주시면 더욱 감사하겠습니다. 오늘도 감사합니다. 수고하세요!!!
프로필 이미지
해암
2025-05-21
268
글번호 191045
지표

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-05-21
199
글번호 191044
검색
답변완료

수식 의뢰 드립니다.

안녕하세요! 콜과풋 교차차트에서 콜 1종목에만 당일 저가와 고가의 수식을 아래와 같이 적용했는데 콜과풋 모두에게 적용이 됩니다! 혹시 콜이나 풋 한종목에만 적용시키고 배경색을 넣을 수 있는지요? var1 = DayHigh; var2 = DayLow; Plot1(DayHigh,"당일고가"); Plot2(DayLow,"당일저가");
프로필 이미지
qha71
2025-05-21
192
글번호 191043
지표

와우리 님에 의해서 삭제되었습니다.

프로필 이미지
와우리
2025-05-21
50
글번호 191035
지표

사공하늘 님에 의해서 삭제되었습니다.

프로필 이미지
사공하늘
2025-05-21
73
글번호 191029
검색
답변완료

문의드립니다.

안녕하세요 항상 감사드립니다. 아래의 서식에서 추가적인 서식을 부탁드립니다. *추가사항 1.전일 대비 갭상승(하락)시 진입 금지. 갭의 값은 3pt로 해주시고, 추후 최적화를 하여 결정할 예정입니다. 최적화를 할 수 있도록 input으로 넣어주시기 바랍니다. # KOSPI 선물 10분봉 input: tt(150000),당일진입횟수(3); var: chkP(10), reChkP(20), stopChk(25); var: HH(0), LL(0), BS(0), SS(0); var: dayChk(0); var : TotalCount(0),PreDay(0),DayEntry(0); TotalCount = TotalTrades; if Bdate != Bdate[1] Then PreDay = TotalCount[1]; DayEntry = (TotalCount-PreDay)+IFF(MarketPosition != 0,1,0); if BarIndex == 0 then ClearDebug(); if dayindex == chkP then { HH = Highest(Max(C,O), chkP+1); LL = Lowest(Min(C,O), chkP+1); #if date == 20240612 then messageLog("--HH %.2f, LL: %.2f", HH, LL); } #if High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then messageLog("HH %.2f, High: %.2f", HH, High); if DayIndex >= chkP # and Time < 95000 and sDate == NextBarSdate and EntryDate(0) < Date and EntryDate(1) < Date and DayEntry < 당일진입횟수 Then { Buy("B1", AtStop, HH); Sell("S1", AtStop, LL); } //if dayChk == 0 and High >= HH and MarketPosition == 0 and ExitDate(1) < Date and time > 93000 then { // messageLog("HH %.2f, High: %.2f", HH, High); // dayChk = 1; //} if ExitDate(1) == Date and Time < 150000 // and LatestEntryName(1) != "B2" // and LatestEntryName(1) != "S2" // and LatestEntryName(0) != "B2" // and LatestEntryName(0) != "S2" Then { if DayIndex < reChkP Then { HH = Highest(Max(C,O), DayIndex+1); LL = Lowest(Min(C,O), DayIndex+1); } Else { HH = Highest(Max(C,O), reChkP); LL = Lowest(Min(C,O), reChkP); } if DayEntry < 당일진입횟수 Then { Buy("B2", AtStop, HH); Sell("S2", AtStop, LL); } } if (MarketPosition == 1) Then { if DayIndex < stopChk Then { BS = Lowest(Min(C,O), DayIndex+1); } Else { BS = Lowest(Min(C,O), stopChk); } ExitLong("EL", AtStop, BS); } if (MarketPosition == -1) Then { if DayIndex < stopChk Then { SS = Highest(Max(C,O), DayIndex+1); } Else { SS = Highest(Max(C,O), stopChk); } #messageLog(" SS %.2f", SS); ExitShort("ES", AtStop, SS); } var : month(0),nday(0),week(0),X(False); month = int(date/100)-int(date/10000)*100; nday = date - int(date/100)*100; Week = DayOfWeek(date); #만기일 if (month%3 == 0 and nday >= 8 and nday <= 14 and week == 4) then { X = true; SetStopEndofday(151500); } Else#만기일아닐때 { X = False; SetStopEndofday(152000); }
프로필 이미지
가자아이
2025-05-21
239
글번호 191028
지표