커뮤니티
예스랭귀지 Q&A
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1315
글번호 230811
답변완료
안녕하세요..
수고하십니다.
매수 진입후 30분 후 에 현재가가 당일 고가를 넘어서면 청산 할 때
즉시청산과 분봉종가 두가지 방법중 (1) 수익이 1포 넘으면 즉시청산하고 (2) 1포이하면 분봉종가 청산을하고 싶네요
매도 또한 마찬가지입니다.
2025-05-30
244
글번호 191287
답변완료
문의 드립니다.
안녕하세요 ~
RSI(5)가 70 이상이고, 아래의 수식/이평선을 돌파할 때 종목 검색식 부탁드립니다.
A=avg(c,17);
ATR=avg(max(max(h-L,abs(c(1)-h)),abs(c(1)-L)),17);
B=ATR;
D=A+B;
감사합니다
2025-05-30
262
글번호 191283
답변완료
수정부탁드립니다 감사합니다
1.// === 사용자 입력 ===
Input : 기준거래량배율(1.5), 체결강도EMA(20), OI_EMA단기(10), OI_EMA장기(60);
// === 변수 선언 ===
Var: 매수체결량(0), 매도체결량(0),
순매수체결량(0), 순매도체결량(0),
순체결강도(0), 체결EMA(0);
Var: OI변화(0), 누적OI(0), OI_EMA1(0), OI_EMA2(0);
Var: 기준거래량(0), 거래량필터패스(False), tx(0);
// === 거래량 필터 ===
기준거래량 = Average(Volume, 20);
If Volume < 기준거래량 * 기준거래량배율 Then Return;
// === 체결강도 계산 ===
매수체결량 = IFF(Close > Close[1], Volume, 0);
매도체결량 = IFF(Close < Close[1], Volume, 0);
순매수체결량 = ACCUM(매수체결량);
순매도체결량 = ACCUM(매도체결량);
순체결강도 = ACCUM(매수체결량 - 매도체결량);
// === 체결강도 EMA ===
체결EMA = EMA(순체결강도, 체결강도EMA);
// === 체결강도 급증 알림 ===
If CrossUp(순체결강도, 체결EMA) Then
Begin
tx = Text_New_Self(Date, Time, Close, "체결강도↑");
Text_SetColor(tx, Red);
Text_SetStyle(tx, 2, 0);
End;
// === OI 변화 누적 및 이동평균 ===
OI변화 = OI - OI[1];
누적OI = ACCUMN(OI변화, DayIndex());
OI_EMA1 = EMA(누적OI, OI_EMA단기);
OI_EMA2 = EMA(누적OI, OI_EMA장기);
// === OI 교차 알림 ===
If CrossUp(OI_EMA1, OI_EMA2) Then
Begin
tx = Text_New_Self(Date, Time, Close, "OI↑");
Text_SetColor(tx, Green);
End;
If CrossDown(OI_EMA1, OI_EMA2) Then
Begin
tx = Text_New_Self(Date, Time, Close, "OI↓");
Text_SetColor(tx, Blue);
End;
// === 차트 출력 ===
Plot1(순매수체결량, "순매수");
Plot2(순매도체결량, "순매도");
Plot3(순체결강도, "순체결강도");
Plot4(체결EMA, "체결EMA");
Plot5(누적OI, "누적OI");
Plot6(OI_EMA1, "OI EMA10");
Plot7(OI_EMA2, "OI EMA60");
PlotBaseLine1(0);
2.// =================== 입력값 ===================
Input: 기준거래량배율(1.5), 체결EMA기간(20), OI_EMA단기(10), OI_EMA장기(60),
익절률(1.02), 손절률(0.985), 박스색(RGB(220,220,220));
// =================== 변수 ===================
Var: 매수체결량(0), 매도체결량(0), 순체결강도(0), 체결EMA(0);
Var: OI변화(0), 누적OI(0), OI_EMA1(0), OI_EMA2(0);
Var: 기준거래량(0), 진입가(0), 익절가(0), 손절가(0), 진입중(False), 박스ID(0);
// =================== 거래량 필터 ===================
기준거래량 = Average(Volume, 20);
If Volume < 기준거래량 * 기준거래량배율 Then Return;
// =================== 체결강도 ===================
매수체결량 = IFF(Close > Close[1], Volume, 0);
매도체결량 = IFF(Close < Close[1], Volume, 0);
순체결강도 = ACCUM(매수체결량 - 매도체결량);
체결EMA = EMA(순체결강도, 체결EMA기간);
// =================== OI 누적 및 이동평균 ===================
OI변화 = OI - OI[1];
누적OI = ACCUMN(OI변화, DayIndex());
OI_EMA1 = EMA(누적OI, OI_EMA단기);
OI_EMA2 = EMA(누적OI, OI_EMA장기);
// =================== 진입 조건 ===================
If 진입중 = False AND
순체결강도 > 체결EMA AND
CrossUp(OI_EMA1, OI_EMA2)
Then
Begin
진입가 = Close;
익절가 = 진입가 * 익절률;
손절가 = 진입가 * 손절률;
진입중 = True;
// 박스 출력
박스ID = Rectangle_New(Date, Time, 익절가, Date, Time, 손절가);
Rectangle_SetColor(박스ID, 박스색);
Rectangle_SetStyle(박스ID, 1);
Rectangle_SetSize(박스ID, 2);
// 진입 텍스트
Text_New(Date, Time, Close, "진입 ▶");
End;
// =================== 청산 조건 ===================
If 진입중 Then
Begin
If Close >= 익절가 Then
Begin
Text_New(Date, Time, Close, "익절 ✅");
진입중 = False;
End
Else If Close <= 손절가 Then
Begin
Text_New(Date, Time, Close, "손절 ❌");
진입중 = False;
End;
End;
3.// =================== 입력값 ===================
Input: 기준거래량배율(1.5), 체결EMA기간(20), OI_EMA단기(10), OI_EMA장기(60),
익절률(1.02), 손절률(0.985),
숏익절률(0.98), 숏손절률(1.015),
박스색_롱(RGB(220,220,220)), 박스색_숏(RGB(200,230,255));
// =================== 변수 ===================
Var: 매수체결량(0), 매도체결량(0), 순체결강도(0), 체결EMA(0);
Var: OI변화(0), 누적OI(0), OI_EMA1(0), OI_EMA2(0);
Var: 기준거래량(0), 진입가(0), 익절가(0), 손절가(0), 진입중(False), 숏진입(False);
Var: 박스ID(0);
// =================== 거래량 필터 ===================
기준거래량 = Average(Volume, 20);
If Volume < 기준거래량 * 기준거래량배율 Then Return;
// =================== 체결강도 계산 ===================
매수체결량 = IFF(Close > Close[1], Volume, 0);
매도체결량 = IFF(Close < Close[1], Volume, 0);
순체결강도 = ACCUM(매수체결량 - 매도체결량);
체결EMA = EMA(순체결강도, 체결EMA기간);
// =================== OI 이동평균 ===================
OI변화 = OI - OI[1];
누적OI = ACCUMN(OI변화, DayIndex());
OI_EMA1 = EMA(누적OI, OI_EMA단기);
OI_EMA2 = EMA(누적OI, OI_EMA장기);
// =================== 롱 진입 ===================
If 진입중 = False AND 순체결강도 > 체결EMA AND CrossUp(OI_EMA1, OI_EMA2) Then
Begin
진입가 = Close;
익절가 = 진입가 * 익절률;
손절가 = 진입가 * 손절률;
진입중 = True;
숏진입 = False;
박스ID = Rectangle_New(Date, Time, 익절가, Date, Time, 손절가);
Rectangle_SetColor(박스ID, 박스색_롱);
Rectangle_SetStyle(박스ID, 1);
Rectangle_SetSize(박스ID, 2);
Text_New(Date, Time, Close, "롱 진입 ▶");
End;
// =================== 숏 진입 ===================
If 진입중 = False AND 순체결강도 < 체결EMA AND CrossDown(OI_EMA1, OI_EMA2) Then
Begin
진입가 = Close;
익절가 = 진입가 * 숏익절률;
손절가 = 진입가 * 숏손절률;
진입중 = True;
숏진입 = True;
박스ID = Rectangle_New(Date, Time, 익절가, Date, Time, 손절가);
Rectangle_SetColor(박스ID, 박스색_숏);
Rectangle_SetStyle(박스ID, 1);
Rectangle_SetSize(박스ID, 2);
Text_New(Date, Time, Close, "숏 진입 ▼");
End;
// =================== 청산 조건 ===================
If 진입중 Then
Begin
If 숏진입 = False Then // 롱
Begin
If Close >= 익절가 Then
Begin
Text_New(Date, Time, Close, "롱 익절 ✅");
진입중 = False;
End
Else If Close <= 손절가 Then
Begin
Text_New(Date, Time, Close, "롱 손절 ❌");
진입중 = False;
End;
End
Else // 숏
Begin
If Close <= 익절가 Then
Begin
Text_New(Date, Time, Close, "숏 익절 ✅");
진입중 = False;
End
Else If Close >= 손절가 Then
Begin
Text_New(Date, Time, Close, "숏 손절 ❌");
진입중 = False;
End;
End;
End;
4.// 기본 입력값
Input: 진입가(0), 손절비율(0.985), 익절비율(1.015), 박스색상(Green), 손절색상(Red);
// 진입, 손절, 익절가 계산
Var: 익절가(0), 손절가(0), 손익비(0);
익절가 = 진입가 * 익절비율;
손절가 = 진입가 * 손절비율;
손익비 = Round((익절가 - 진입가) / (진입가 - 손절가), 2);
// 박스 출력 (익절)
Var: 익절박스(0);
익절박스 = Box_New(Date, Time, 진입가, Date+1, Time, 익절가);
Box_SetColor(익절박스, 박스색상);
Box_SetFill(익절박스, true);
// 박스 출력 (손절)
Var: 손절박스(0);
손절박스 = Box_New(Date, Time, 손절가, Date+1, Time, 진입가);
Box_SetColor(손절박스, 손절색상);
Box_SetFill(손절박스, true);
// 텍스트 출력: 손익비
Var: tx(0);
tx = Text_New(Date, Time, 손절가 - (진입가 - 손절가)/2, "손익비: " + NumToStr(손익비, 2));
Text_SetStyle(tx, 1, 0);
Text_SetColor(tx, Black);
Text_SetSize(tx, 10);
5.// === 사용자 입력 ===
Input: 진입가(0), 손절비율(1.015), 익절비율(0.985), 박스색상(Red), 손절색상(Green);
// === 익절/손절가 계산 ===
Var: 익절가(0), 손절가(0), 손익비(0);
익절가 = 진입가 * 익절비율;
손절가 = 진입가 * 손절비율;
손익비 = Round((진입가 - 익절가) / (손절가 - 진입가), 2);
// === 익절 박스 생성 ===
Var: 익절박스(0);
익절박스 = Box_New(Date, Time, 익절가, Date + 1, Time, 진입가);
Box_SetColor(익절박스, 박스색상);
Box_SetFill(익절박스, true);
// === 손절 박스 생성 ===
Var: 손절박스(0);
손절박스 = Box_New(Date, Time, 진입가, Date + 1, Time, 손절가);
Box_SetColor(손절박스, 손절색상);
Box_SetFill(손절박스, true);
// === 손익비 텍스트 출력 ===
Var: tx(0);
tx = Text_New(Date, Time, 손절가 + (손절가 - 진입가)/2, "손익비: " + NumToStr(손익비, 2));
Text_SetStyle(tx, 1, 1);
Text_SetColor(tx, Black);
Text_SetSize(tx, 10);
수정부탁드립니다 감사합니다
2025-05-30
318
글번호 191282
답변완료
문의드립니다
1분 / 주식 / 통합 차트
전일 종가선을 만들고 싶습니다
감사합니다
2025-05-30
254
글번호 191281
답변완료
수식 부탁드립니다
지표식 부탁드립니다.
//@version=5
indicator("Target Trend ", overlay = true, max_lines_count = 40)
// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
length = input.int(10, "Trend Length")
target = input.int(0, "Set Targets")
// }
// VARIABLES ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
var bool trend = na
float trend_value = na
// Colors
color up_color = #06b690
color dn_color = color.rgb(182, 112, 6)
// ATR for calculating stop loss and target levels
series float atr_value = ta.sma(ta.atr(200), 200) * 0.8
// Moving averages for trend detection
series float sma_high = ta.sma(high, length) + atr_value
series float sma_low = ta.sma(low, length) - atr_value
color plot_color = color.new(chart.fg_color, 80)
// UDT for managing lines and labels
type TrendTargets
line[] lines
label[] labels
// Initialize UDT
var TrendTargets targets_up = TrendTargets.new(array.new_line(), array.new_label())
var TrendTargets targets_down = TrendTargets.new(array.new_line(), array.new_label())
// }
// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Determine trend based on crossovers
if ta.crossover(close, sma_high) and barstate.isconfirmed
trend := true
if ta.crossunder(close, sma_low) and barstate.isconfirmed
trend := false
trend_value := switch
trend => sma_low
not trend => sma_high
trend_color = trend ? up_color : not trend ? dn_color : na
// Signal detection for trend changes
bool signal_up = ta.change(trend) and not trend[1]
bool signal_down = ta.change(trend) and trend[1]
// Method to draw trend targets and manage lines/labels
method draw_targets(TrendTargets targets, bool signal1, bool signal2, bool direction)=>
float base = direction ? sma_low : sma_high
float atr_multiplier = atr_value * (direction ? 1 : -1)
// Reset counters for up and down targets
var int count_up = 0
var int count_down = 0
if trend
count_down := 0
count_up += 1
if not trend
count_down += 1
count_up := 0
int count = direction ? count_up : count_down
if signal1
float target_len1 = atr_multiplier * (5+target)
float target_len2 = atr_multiplier * (10+target*2)
float target_len3 = atr_multiplier * (15+target*3)
// Clear existing lines and labels
for line_i in targets.lines
int i = targets.lines.indexof(line_i)
label.delete(targets.labels.get(i))
line.delete(line_i)
array.clear(targets.lines)
array.clear(targets.labels)
// Draw new lines for trend targets
line stop_loss_line = line.new(bar_index, base, bar_index + 20, base)
line entry_line = line.new(bar_index, close, bar_index + 20, close)
line target1_line = line.new(bar_index, close + target_len1, bar_index + 20, close + target_len1)
line target2_line = line.new(bar_index, close + target_len2, bar_index + 20, close + target_len2)
line target3_line = line.new(bar_index, close + target_len3, bar_index + 20, close + target_len3)
// Fill between stop loss and entry line
linefill.new(stop_loss_line, entry_line, color.new(dn_color, 95))
linefill.new(entry_line, target3_line, color.new(up_color, 95))
// Draw new labels for trend targets
label stop_loss_label = label.new(bar_index + 20, base, str.tostring(math.round(base, 2)))
label entry_label = label.new(bar_index + 20, close, str.tostring(math.round(close, 2)))
label target1_label = label.new(bar_index + 20, close + target_len1, "1 - " + str.tostring(math.round(close + target_len1, 2)))
label target2_label = label.new(bar_index + 20, close + target_len2, "2 - " + str.tostring(math.round(close + target_len2, 2)))
label target3_label = label.new(bar_index + 20, close + target_len3, "3 - " + str.tostring(math.round(close + target_len3, 2)))
// Push lines and labels to the UDT
targets.lines.push(stop_loss_line)
targets.lines.push(entry_line)
targets.lines.push(target1_line)
targets.lines.push(target2_line)
targets.lines.push(target3_line)
targets.labels.push(stop_loss_label)
targets.labels.push(entry_label)
targets.labels.push(target1_label)
targets.labels.push(target2_label)
targets.labels.push(target3_label)
// 업데이트 styles for labels and lines
for lbl in targets.labels
int idx = targets.labels.indexof(lbl)
line line_ref = targets.lines.get(idx)
lbl.set_style(label.style_label_left)
lbl.set_color(chart.fg_color)
lbl.set_textcolor(chart.bg_color)
line_ref.set_color(chart.fg_color)
if signal2
// Clear existing lines and labels
for line_i in targets.lines
int i = targets.lines.indexof(line_i)
label.delete(targets.labels.get(i))
line.delete(line_i)
array.clear(targets.lines)
array.clear(targets.labels)
for line_i in targets.lines
int idx = targets.lines.indexof(line_i)
label lbl_ref = targets.labels.get(idx)
label first_label = targets.labels.first()
line entry_line = targets.lines.get(1)
label entry_label = targets.labels.get(1)
// Targets
if high >= line.get_y2(line_i) and low <= line.get_y2(line_i) and count > 1
lbl_ref.set_style(label.style_label_left)
lbl_ref.set_color(chart.fg_color)
lbl_ref.set_text(" ✔ ")
lbl_ref.set_textcolor(#16ac09)
line_i.set_style(line.style_dashed)
line_i.set_color(plot_color)
// Stop Loss
if high >= line.get_y2(targets.lines.first()) and low <= line.get_y2(targets.lines.first()) and count > 1
first_label.set_text(" ✖ ")
if direction ? trend : not trend
first_label.set_textcolor(#db1e1e)
line_i.set_x2(bar_index + 20)
targets.lines.first().set_color(#db1e1e)
label.set_x(targets.labels.get(idx), bar_index + 20)
entry_line.set_style(line.style_solid)
entry_line.set_color(up_color)
entry_label.set_text("◉ " + str.tostring(math.round(line.get_y2(entry_line), 2)))
entry_label.set_textcolor(#1d80dd)
// }
// PLOT―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
// Call the draw_targets method for both upward and downward trends
targets_down.draw_targets(signal_down, signal_up, false)
targets_up.draw_targets(signal_up, signal_down, true)
// Plot candlesticks with trend color
plotcandle(open, high, low, close,
title = 'Title',
color = trend_color,
wickcolor = trend_color,
bordercolor = trend_color)
// Plot trailing stops
p1 = plot(trend ? trend_value : na, style = plot.style_linebr, color = plot_color)
p2 = plot(not trend ? trend_value : na, style = plot.style_linebr, color = plot_color)
p0 = plot(hl2, display = display.none, editable = false)
fill(p1, p0, trend_value, hl2, color.new(chart.fg_color, 90), na)
fill(p2, p0, trend_value, hl2, color.new(chart.fg_color, 90), na)
// Plot signals on the chart
float sigUp = signal_up ? low - atr_value*2 : na
float sigDn = signal_down ? high + atr_value*2 : na
plotshape(sigUp, "", shape.triangleup, location.absolute, up_color, size = size.tiny)
plotshape(sigUp, "", shape.triangleup, location.absolute, color.new(up_color, 80), size = size.small)
plotshape(sigDn, "", shape.triangledown, location.absolute, dn_color, size = size.tiny)
plotshape(sigDn, "", shape.triangledown, location.absolute, color.new(dn_color, 80), size = size.small)
// }
2025-05-30
417
글번호 191280
답변완료
수식 검증 및 문의
안녕하세요, 아래 문의사항 확인 부탁드립니다
1. 아래 로직대로 코드가 짜였는지 검증 부탁드립니다.
- 장 오픈 후 5분~30분(변수로 테스트) 봉의 High and Low를 파악 (8시~익일 7시 운영 거래소)
- 첫 봉이 양봉이었으면 매수만 가능. 종가가 High를 돌파하면 매수 진입
- 첫 봉이 음봉이었으면 매도만 가능, 종가가 Low를 돌파하면 매도 진입
- 스탑로스는 14일 ATR * XX%
- 당일청산 (익일 7시 전)
2. 14일 ATR을 사용하고 싶은데 코드는 봉수 기준이라 14일만 따로 적용할 수 있는 방법이 있을까요?
3. SetStopEndofDay는 한국시간 익일에 장 마감하는 미국장에도 적용이 올바르게 된건가요?
감사합니다
[코드]
Input: NMin(5); // Step 1 until 30
Vars: FirstNHigh(0), FirstNLow(0), FirstNOpen(0), FirstNClose(0);
Vars: ATR14(0), StopLoss(0);
// N분 단위 첫 봉의 종료시간 계산
Vars: FirstEndTime(0);
FirstEndTime = 80000 + NMin * 100;
// 1. 첫 5분봉 High/Low/Open/Close 파악 (5분봉 기준)
If Date <> Date[1] Then
{
FirstNHigh = TimeHigh(80000, FirstEndTime);
FirstNLow = TimeLow(80000, FirstEndTime);
FirstNOpen = TimeOpen(80000, FirstEndTime);
FirstNClose = TimeClose(80000, FirstEndTime);
}
// 2. ATR(14) 계산 및 스탑로스 설정
Input: ATRFactor(10); // Step 10 until 100
ATR14 = ATR(14);
StopLoss = ATR14 * ATRFactor / 100;
// 3. 매수 조건: 첫 5분봉 양봉 & High 돌파
If FirstNClose > FirstNOpen and Close > FirstNHigh Then
{
If MarketPosition == 0 Then
Buy("ORBLong",AtMarket,DEf,1);
}
// 4. 매도 조건: 첫 5분봉 음봉 & Low 돌파
If FirstNClose < FirstNOpen and Close < FirstNLow Then
{
If MarketPosition == 0 Then
Sell("ORBShort",AtMarket,DEf,1);
}
// 5. 스탑로스 (ATR 10% 이탈 시)
If MarketPosition == 1 Then ExitLong("A1",AtStop,EntryPrice - StopLoss);
If MarketPosition == -1 Then ExitShort("B1",AtStop,EntryPrice + StopLoss);
// 6. 당일 청산
If MarketPosition <> 0 Then SetStopEndofday(065500);
2025-05-30
260
글번호 191279
답변완료
지표부탁드립니다.
<첫번째>
동그라미한 라인의 중간선들 굵기를 1~2포인트 굵게 부탁드립니다.
input : 간격(2.5);
var : cnt(0);
Array : HTL1[100](0),LTL1[100](0);
Array : HTL2[100](0),LTL2[100](0);
Array : HTL3[100](0),LTL3[100](0);
Array : HTL4[100](0),LTL4[100](0);
if Index == 1 or Bdate != Bdate[1] Then
{
var1 = Floor(DayOpen/간격)*간격;
For cnt = 0 to 99
{
TL_Delete(HTL1[cnt]);
TL_Delete(LTL1[cnt]);
TL_Delete(HTL2[cnt]);
TL_Delete(LTL2[cnt]);
TL_Delete(HTL3[cnt]);
TL_Delete(LTL3[cnt]);
TL_Delete(HTL4[cnt]);
TL_Delete(LTL4[cnt]);
value1 = var1+간격*cnt;
value2 = value1+(간격/4)*1;
value3 = value1+(간격/4)*2;
value4 = value1+(간격/4)*3;
HTL1[cnt] = TL_New(sDate,sTime,value1,NextBarSdate,NextBarStime,Value1);
HTL2[cnt] = TL_New(sDate,sTime,value2,NextBarSdate,NextBarStime,Value2);
HTL3[cnt] = TL_New(sDate,sTime,value3,NextBarSdate,NextBarStime,Value3);
HTL4[cnt] = TL_New(sDate,sTime,value4,NextBarSdate,NextBarStime,Value4);
TL_SetExtLeft(HTL1[cnt],true);
TL_SetExtLeft(HTL2[cnt],true);
TL_SetExtLeft(HTL3[cnt],true);
TL_SetExtLeft(HTL4[cnt],true);
TL_SetExtRight(HTL1[cnt],true);
TL_SetExtRight(HTL2[cnt],true);
TL_SetExtRight(HTL3[cnt],true);
TL_SetExtRight(HTL4[cnt],true);
TL_SetSize(HTL1[cnt],5);
TL_SetSize(HTL2[cnt],0);
TL_SetSize(HTL3[cnt],0.5);
TL_SetSize(HTL4[cnt],0);
TL_SetStyle(HTL1[cnt],0.5);
TL_SetStyle(HTL2[cnt],3);
TL_SetStyle(HTL3[cnt],0.5);
TL_SetStyle(HTL4[cnt],3);
if cnt >= 1 Then
{
value5 = var1-간격*cnt;
value6 = value5+(간격/4)*1;
value7 = value5+(간격/4)*2;
value8 = value5+(간격/4)*3;
LTL1[cnt] = TL_New(sDate,sTime,value5,NextBarSdate,NextBarStime,Value5);
LTL2[cnt] = TL_New(sDate,sTime,value6,NextBarSdate,NextBarStime,Value6);
LTL3[cnt] = TL_New(sDate,sTime,value7,NextBarSdate,NextBarStime,Value7);
LTL4[cnt] = TL_New(sDate,sTime,value8,NextBarSdate,NextBarStime,Value8);
TL_SetExtLeft(LTL1[cnt],true);
TL_SetExtLeft(LTL2[cnt],true);
TL_SetExtLeft(LTL3[cnt],true);
TL_SetExtLeft(LTL4[cnt],true);
TL_SetExtRight(LTL1[cnt],true);
TL_SetExtRight(LTL2[cnt],true);
TL_SetExtRight(LTL3[cnt],true);
TL_SetExtRight(LTL4[cnt],true);
TL_SetSize(LTL1[cnt],5);
TL_SetSize(LTL2[cnt],0);
TL_SetSize(LTL3[cnt],0.5);
TL_SetSize(LTL4[cnt],0);
TL_SetStyle(LTL1[cnt],0.5);
TL_SetStyle(LTL2[cnt],3);
TL_SetStyle(LTL3[cnt],0.5);
TL_SetStyle(LTL4[cnt],3);
}
}
}
<두번째 키움에서 쓰던 수식선입니다. 5가지선 부탁드립니다.>
<중심선>
N2=(predayhigh()+dayopen())/2;
중심값=(predayclose()+predayhigh()+predaylow())/3;
G2=2*중심값-predaylow();
H2=중심값+predayhigh()-predaylow();
M2=(G2+H2)/2;
하양중심=(N2+M2)/2;
J2=((중심값*2-predayhigh())+(중심값+predaylow()-predayhigh()))/2;
L2=(predaylow()+dayopen())/2;
K2=(J2+L2)/2;
신중심=(하양중심+k2)/2;
<고점중심>
N2=(predayhigh()+dayopen())/2;
중심값=(predayclose()+predayhigh()+predaylow())/3;
G2=2*중심값-predaylow();
H2=중심값+predayhigh()-predaylow();
M2=(G2+H2)/2;
하양중심=(N2+M2)/2;
<저점중심>
중심값=(predayclose()+predayhigh()+predaylow())/3;
J2=((중심값*2-predayhigh())+(중심값+predaylow()-predayhigh()))/2;
L2=(predaylow()+dayopen())/2;
K2=(J2+L2)/2;
<상중심>
N2=(predayhigh()+dayopen())/2;
중심값=(predayclose()+predayhigh()+predaylow())/3;
G2=2*중심값-predaylow();
H2=중심값+predayhigh()-predaylow();
M2=(G2+H2)/2;
하양중심=(N2+M2)/2;
J2=((중심값*2-predayhigh())+(중심값+predaylow()-predayhigh()))/2;
L2=(predaylow()+dayopen())/2;
K2=(J2+L2)/2;
신중심=(하양중심+k2)/2;
상중심=신중심+1.25;
<하중심>
N2=(predayhigh()+dayopen())/2;
중심값=(predayclose()+predayhigh()+predaylow())/3;
G2=2*중심값-predaylow();
H2=중심값+predayhigh()-predaylow();
M2=(G2+H2)/2;
하양중심=(N2+M2)/2;
J2=((중심값*2-predayhigh())+(중심값+predaylow()-predayhigh()))/2;
L2=(predaylow()+dayopen())/2;
K2=(J2+L2)/2;
신중심=(하양중심+k2)/2;
하중심=신중심-1.25;
2025-06-17
290
글번호 191278
살빼고싶다 님에 의해서 삭제되었습니다.
2025-05-29
15
글번호 191277
답변완료
수식 문의 드립니다.
안녕하세요.
지표문의 드립니다.
당일 오전(장시작 후 부터 12시까지)의 중간값과 당일고가, 당일저가 사이의
피보나치 회귀선 수식을 문의드립니다.
중간값과 당일고가 / 중간값과 당일저가 사이의 피보나치선을 하나의 수식에
표현이 가능하면 하나의 수식으로 부탁드립니다.
2025-05-29
282
글번호 191276