커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
1590
글번호 230811
답변완료
시스템식 요청드립니다.
아래의 식에서 수정이 필요한데 자꾸 오류가 생겨 요청드립니다.
아래의 시스템식은 주가가 14 이평선위에 있다가 해당 이평선을 하향돌파했을때
매수하는 시스템식으로 5% 하락할때마다 분할매수 하고
매도는 매수평단에서 3% 4% 5% 분할매도 하는 시스템 식입니다.
그림파일 1번이 보시면 현재 작성되어있는 식으로 제대로 작동하고 있습니다.
--수정하고 싶은 내용은--
4차 매수 이후부터는 각 차수(4,5,6차)에 매수한 평단에서 4%가 상승하면,
각 차수(4,5,6차)에 매수한 금액(수량) 만큼만 매도 하고,
다시 각 차수(4,5,6차) 매수자리에 오면 매수하는 시스템식으로 수정하고 싶습니다.
예를 들면 그림파일 2번 을 보시면
4차 매수 이후에 4차에 매수한 평단에서 4% 가 상승했을때, 4차에 매수한 금액(수량) 만큼만
매도 해야하고 다시 떨어졌을때, 4차에서 매수하고 싶습니다.
그래서 아래와 같이 4차매수 이후 분할매도식을 수정을 했는데,
4차이후 4% 상승했을때, 전부다 팔리는 상황이 벌어지는데
어떻게 수정을 해야 할지 몰라 요청드립니다.
if Condition1 == False AND ((LatestEntryName(0) == "4차매수"))Then
ExitLong("분할4익절",AtLimit,LatestEntryPrice(0)*1.04,"",Floor(금액*1.25/min(NextBarOpen,mav)));
if Condition1 == False AND ((LatestEntryName(0) == "5차매수"))Then
ExitLong("분할5익절",AtLimit,LatestEntryPrice(0)*1.04,"",Floor(금액*1.3/min(NextBarOpen,mav)));
if Condition1 == False AND ((LatestEntryName(0) == "6차매수"))Then
ExitLong("분할6익절",AtLimit,LatestEntryPrice(0)*1.04,"",Floor(금액*1.35/min(NextBarOpen,mav)));
---------------------------------------------------------------
input : N(14),금액(2000000);
input : 시작날짜 (20250109);
Input : 기준선기간(120);
Var : 기준선(0);
var : cntt(0),H1(0),L1(0);
var : cnt(0),sum(0),mav(0),DD(0);
var : AP(0),TT(0),entry(False);
var : LL(0),RR(0),rate(0);
var : 저항(0), B1(0) ;
Var : day(0),EntryDay(0),ddd(0),ED(0);
#-------------------------------------
if sDate >= 시작날짜 Then
{
if Bdate != Bdate[1] Then
{
entry = true;
day = day+1;
dd = dd+1;
}
}
if TotalTrades > TotalTrades[1] Then
entry = False;
#-------------------------------------
#-------------------------------------
sum = 0;
For cnt = 0 to N-1
{
sum = sum + DayClose(cnt);
}
mav = (sum/N);
#-------------------------------------
#---------------------------------------
if (MarketPosition == 0) and (entry == true) and L > mav Then
Buy("1차매수",AtLimit,mav,Floor(금액/min(NextBarOpen,mav)));
if (LatestEntryName(0) == "1차매수") Then
Buy("2차매수",AtLimit,LatestEntryPrice(0)*0.95,Floor(금액*1.15/min(NextBarOpen,mav)));
if (LatestEntryName(0) == "2차매수") Then
Buy("3차매수",AtLimit,LatestEntryPrice(0)*0.95,Floor(금액*1.2/min(NextBarOpen,mav)));
if (LatestEntryName(0) == "3차매수") Then
Buy("4차매수",AtLimit,LatestEntryPrice(0)*0.95,Floor(금액*1.25/min(NextBarOpen,mav)));
if (LatestEntryName(0) == "4차매수") Then
Buy("5차매수",AtLimit,LatestEntryPrice(0)*0.95,Floor(금액*1.3/min(NextBarOpen,mav)));
if (LatestEntryName(0) == "5차매수") Then
Buy("6차매수",AtLimit,LatestEntryPrice(0)*0.95,Floor(금액*1.35/min(NextBarOpen,mav)));
#-----------------------------------
if MarketPosition == 1 Then
{
#전봉대비 수량 감소(일부 청산발생을 위미)
if CurrentContracts < CurrentContracts[1] Then
{
#청산가 저장
var1 = LatestExitPrice(0);
if LatestExitName(0) == "3%익절" or LatestExitName(0) == "3-D%익절" or LatestExitName(0) == "3-E%익절" Then
Condition1 = true;
if LatestExitName(0) == "4%익절" or LatestExitName(0) == "4-D%익절" or LatestExitName(0) == "4-E%익절" Then
Condition2 = true;
if LatestExitName(0) == "5%익절" or LatestExitName(0) == "5-D%익절" or LatestExitName(0) == "5-E%익절" Then
Condition3 = true;
if LatestExitName(0) == "7%익절" or LatestExitName(0) == "7-D%익절" Then
Condition4 = true;
}
#전봉대비 수량 증가(추가 진입발생을 의미)
if CurrentContracts > CurrentContracts[1] AND ((LatestEntryName(0) == "1차매수") OR (LatestEntryName(0) == "2차매수") or (LatestEntryName(0) == "3차매수") ) Then
{
#현재수량 저장
Var3 = CurrentContracts;
Var4 = AvgEntryPrice;
Condition1 = False;
Condition2 = False;
Condition3 = False;
Condition4 = False;
}
if CurrentContracts > CurrentContracts[1] AND ((LatestEntryName(0) == "4차매수")) Then
{
#현재수량 저장
Var3 = CurrentContracts;
Var4 = AvgEntryPrice;
Condition1 = False;
Condition2 = False;
Condition3 = False;
Condition4 = False;
}
if CurrentContracts > CurrentContracts[1] AND ((LatestEntryName(0) == "6차매수") or (LatestEntryName(0) == "5차매수")) Then
{
#현재수량 저장
Var3 = CurrentContracts;
Var4 = AvgEntryPrice;
Condition1 = False;
Condition2 = False;
Condition3 = False;
Condition4 = False;
}
if var1 > 0 and C < Var4 then
ExitLong("bx");
if Condition1 == False AND ((LatestEntryName(0) == "1차매수") OR (LatestEntryName(0) == "2차매수") or (LatestEntryName(0) == "3차매수") )Then
ExitLong("3%익절",AtLimit,Var4*1.03,"",Floor(Var3*0.2),1);
if Condition2 == False AND ((LatestEntryName(0) == "1차매수") OR (LatestEntryName(0) == "2차매수") or (LatestEntryName(0) == "3차매수") ) Then
ExitLong("4%익절",AtLimit,Var4*1.04,"",Floor(Var3*0.3),1);
if Condition3 == False AND ((LatestEntryName(0) == "1차매수") OR (LatestEntryName(0) == "2차매수") or (LatestEntryName(0) == "3차매수") ) Then
ExitLong("5%익절",AtLimit,Var4*1.05,"",Floor(Var3*0.4),1);
if Condition4 == False AND ((LatestEntryName(0) == "1차매수") OR (LatestEntryName(0) == "2차매수") or (LatestEntryName(0) == "3차매수") ) Then
ExitLong("7%익절",AtLimit,Var4*1.07,"",Floor(Var3*0.1),1);
ExitLong("10%익절",AtLimit,Var4*1.10);
if Condition1 == False AND ((LatestEntryName(0) == "4차매수"))Then
ExitLong("3-D%익절",AtLimit,Var4*1.03,"",Floor(Var3*0.5),1);
if Condition2 == False AND ((LatestEntryName(0) == "4차매수")) Then
ExitLong("4-D%익절",AtLimit,Var4*1.04,"",Floor(Var3*0.45),1);
if Condition3 == False AND ((LatestEntryName(0) == "4차매수")) Then
ExitLong("5-D%익절",AtLimit,Var4*1.05,"",Floor(Var3*0.1),1);
if Condition1 == False AND ((LatestEntryName(0) == "6차매수") or (LatestEntryName(0) == "5차매수"))Then
ExitLong("3-E%익절",AtLimit,Var4*1.03,"",Floor(Var3*0.5),1);
if Condition2 == False AND ((LatestEntryName(0) == "6차매수") or (LatestEntryName(0) == "5차매수")) Then
ExitLong("4-E%익절",AtLimit,Var4*1.04,"",Floor(Var3*0.45),1);
if Condition3 == False AND ((LatestEntryName(0) == "6차매수") or (LatestEntryName(0) == "5차매수")) Then
ExitLong("5-E%익절",AtLimit,Var4*1.05,"",Floor(Var3*0.1),1);
}
Else#매수진입중이 아니면
{
#변수 0으로 초기화
var1 = 0;
Var2 = 0;
}
2025-03-04
516
글번호 188692
답변완료
수식 변경 부탁드립니다.
InputS: Length(50), Fcast(50);
InputS: FMode("Similarity"), CMode("Cumulative");
VAR: EvalWindowHigh(0), EvalWindowLow(0), RefWindowHigh(0), RefWindowLow(0);
VAR:CorrWindowHigh(0), CorrWindowLow(0), Correlation(0);
VAR: K(0), Alpha(0), Beta(0), E(0), Prev(0), Current(0);
VAR: A(0),B(0),X(0),D(0),I(0);
VAR: R(0),StandardDev(0),Covariance(0),BarNumber(0);
VAR: ShowArea(0);
// Initialize series for forecast and calculation windows
Array: A/ Cthe high and low of the evaluation window
EvalWindowHigh = Highest(High, Length + Fcast * 2);
EvalWindowLow = Lowest(Low, Length + Fcast * 2);
// Loop through and populate arrays for calculations
For I = 0 To Fcast * 2 + Length - 1 Begin
A[I] = Close[I];
If CMode = "Linreg" Then
X[I] = BarNumber[I];
End;
// Reference window
A[0] = A[Length];
// Calculate correlation
For I = 0 To Length - 1 Begin
B[I] = A[Fcast + I];
R = Covariance(A, B) / (StandardDev(A, Length) * StandardDev(B, Length));
// Maximize or minimize correlation based on FMode
If FMode = "Similarity" Then Begin
If R >= Correlation Then Begin
Correlation = R;
K = I;
End;
End
Else Begin
If R <= Correlation Then Begin
Correlation = R;
K = I;
End;
End;
End;
// Set ECHO forecast
Prev = Close;
Current = Close;
For I = 0 To Fcast - 1 Begin
E = D[Fcast + K + (Fcast - I - 1)];
// Calculate forecast point
If CMode = "Mean" Then
Current = Average(A, Fcast) + E;
Else If CMode = "Linreg" Then Begin
Alpha = Covariance(A, X) / Variance(X);
Beta = Average(A) - Alpha * Average(X);
Current = Alpha * (BarNumber + I + 1) + Beta + E;
End
Else
Current = Current + E;
Plot1(Current, "Forecast" + NumToStr(I, 0)); // Plot forecast
Prev = Current;
End;
// Optional: Visualize area for reference, evaluation, and correlation windows
If ShowArea Then Begin
// This part would involve drawing boxes or shaded areas on the chart
// EasyLanguage doesn't have a direct equivalent to boxes, so consider plotting lines or marks
End;
선행지표를 만들어볼려고 하는데 어렵네요. 도와주세여ㅠㅠ
2025-03-01
551
글번호 188691
답변완료
문의 드립니다.
선생님~일반적인 dmi 지표에서 + DI 와 - DI 값을 구할 때 아래의 공식을
사용하잖아요.
DMnPlus = (+DM)의 n일 이동평균값
DMnMinus = (-DM)의 n일 이동평균값
TRn = TR의 이동평균값
+DI = DMnPlus/TRn
-DI = DMnMinus/TRn
DMI = (DiPlus-DIMinus)의 절대값/(DiPlus+DIMinus)*100
제가 원하는건
1) 일반 캔들 기준으로하여
DMnPlus = (+DM)의 n일 지수이동평균값
DMnMinus = (-DM)의 n일 지수이동평균값
TRn = TR의 지수이동평균값
을 적용한 +DI 와 -DI와 DMI 값을 구할 수 있는 지표식
2) 하이킨 아시 캔들을 기준으로 하여 아래의 식을 적용한 +DI 와 -DI와 DMI 값을 구
할 수 있는 지표식
DMnPlus = (+DM)의 n일 이동평균값
DMnMinus = (-DM)의 n일 이동평균값
TRn = TR의 이동평균값
3) 하이킨 아시 캔들을 기준으로 하여 아래의 식을 적용한 +DI 와 -DI와 DMI 값을 구
할 수 있는 지표식
DMnPlus = (+DM)의 n일 지수이동평균값
DMnMinus = (-DM)의 n일 지수이동평균값
TRn = TR의 지수이동평균값
감사드리고 죄송합니다~꾸벅
2025-03-04
483
글번호 188690
답변완료
시스템수식 부탁드립니다.
[첫번째]
시장시간으로 아래와 같이 시간대를 정하여 매일 매매하고
input : StartTime(080000),EndTime(155000);
금요일은 아래와 같이 진입된 매매가 있으면 15시55분에 무조건 청산토록 함수식을
작성했으나 청산이 안되는데 수식이 잘못 되었는지 확인 부탁드립니다.
if sDate != sDate[1] and DayOfWeek(sdate) == 5 Then
SetStopEndofday(155500);
[두번째]
시장시간으로 아래와 같이 시간대를 정하여 매일 매매할때
input : StartTime(170000),EndTime(050000);
진입된 매매가 있을시 05시30분에는 무조건 청산되도록 수식 부탁드립니다.
2025-03-01
465
글번호 188689
촌동네선생 님에 의해서 삭제되었습니다.
2025-03-01
5
글번호 188687
답변완료
수식부탁드립니다.
1.
Input : af(0.02), maxAF(0.2);
var1 = SAR(af,maxAF);
if var1 > C Then
Plot1(var1, "SAR",BLUE);
Else
Plot1(var1, "SAR",RED);
위의 지표식은 파라볼릭 지표식입니다. 연속해서 점이 그려지는 데 전환시에만 좀 큰 점으로
매도신호는 봉위에 파란 동그라미 와 '매도' 텍스트표시
매수신호는 봉아래에 빨간 동그라미 와 '매수' 텍스트 표시 부탁합니다.
2.
var : Xidx(0);
if Tcond == true and 300< H-L Then
{
Trade = False;
Xidx = Index;
}
if Tcond == False and Index == Xind+5 Then
Trade = true;
장대봉에는 진입금지하고 이후 5번째 봉부터 진입식인데
검증하면 Xind 가 선언되지 않았다고 오류 나오는데 혹시 Xidx을 잘못 오기 하신건지요?
3.
if Tcond == true and ((300<H-L) Or (270 <abs(o - c))) Then
{
trade = False;
}
장대봉출현하면 진입금지 라는 식이 어떤 전략에서는 적용이 되는데 다른 전략에서는 적용이 안됩니다. 원인을 못 찾겠습니다.
2025-03-02
451
글번호 188685
답변완료
예스 종목검색식으로 부탁합니다.
안녕하세요.운영자님-
다음과 같은 수식이 있습니다.
아래수식에서 지표가 15%이하 다운되고 덧붙여 키움 지표수식 RSI저점보다 이하일때
그리고 시가대비 1% 이하이면 매수조건으로 종목검색식을
완성해 주시면 고맙겠습니다.
A=RSI(14);
RSI저점=ValueWhen(1,CrossUp(A,30),O);
input : 배분1(0.236),배분2(1.02),DN(1.05);
var : 중최고가(0),중최저가(0),경계(0),경계1(False),경계2(False);
var : 기준봉(0),기준봉1(False),기준봉2(False),결과기준(0),결과기준1(false),결과기준2(false);
var : value(0);
중최고가=Highest(H,20);
중최저가=Lowest(L,20);
경계=(중최고가+중최저가)/2-(중최고가-중최저가)*배분1;
경계1=CROSSUP(C,경계)&&C>O*배분2;
경계2=CROSSDOWN(C,경계);
if 경계1 OR 경계2 Then
기준봉 = O;
기준봉1=CROSSUP(c,기준봉);
기준봉2=CROSSDOWN(c,기준봉);
if 기준봉1 OR 기준봉2 Then
결과기준 = O;
결과기준1=CROSSUP(c,결과기준);
결과기준2=CROSSDOWN(c,결과기준);
if 결과기준1 OR 결과기준2 Then
value = O;
if value < value[1] and
value >= value[1]*0.85 and
C <= O*1.01 Then
Find(1);
2025-02-28
465
글번호 188683
답변완료
보조지표 Y축 스케일
안녕하세요?
아래 Heikin-Ashi RSI를 커뮤니티에 있어서 적용시켜볼려고 보조지표로 추가하니 Y축 값이 높아지거나 낮아질때 스케일이 변경되지 않아 윗부분과 아래부분의 지표막대가 잘 보이지 않아요.
차트창 속성에서 "차트 확대 축소시 간격 자동조절"에도 체크되어 있는데, 높고 낮은 부분에는 잘 보이지 않습니다.
다른 보조 지표들은 스케일이 자동조절됩니다.
수정 부탁드립니다.
input : i_lenHARSI(14),i_smoothing(7),i_lenRSI(7);
var : i_colUp(0),i_colDown(0),i_colWick(0),i_source(0);
var : _closeRSI(0),_openRSI(0),_highRSI_raw(0),_lowRSI_raw(0);
var : _highRSI(0),_lowRSI(0),_close(0),_open(0),_high(0),_low(0);
Var : cnt(0), DownAmt1(0), UpAmt1(0), UpSum1(0), DownSum1(0), UpAvg1(0), DownAvg1(0),RSIV1(0);
Var : DownAmt2(0), UpAmt2(0), UpSum2(0), DownSum2(0), UpAvg2(0), DownAvg2(0),RSIV2(0);
var : bodyColour(0),wickColour(0);
i_colUp = Teal;
i_colDown = Red;
i_colWick = gray;
i_source = (o+h+l+c)/4;
_closeRSI = rsi(i_lenHARSI)-50;
_openRSI = IFF(IsNaN(_closeRSI[1]) == False, _closeRSI[1], _closeRSI);
If CurrentBar == 1 AND i_lenHARSI > 0 Then Begin
UpSum1 = 0;
DownSum1 = 0;
For cnt = 0 To i_lenHARSI - 1 Begin
UpAmt1 = H[cnt] - H[cnt+1];
If UpAmt1 >= 0 Then
DownAmt1 = 0;
Else Begin
DownAmt1 = -UpAmt1;
UpAmt1 = 0;
End;
UpSum1 = UpSum1 + UpAmt1;
DownSum1 = DownSum1 + DownAmt1;
End;
UpAvg1 = UpSum1 / i_lenHARSI;
DownAvg1 = DownSum1 / i_lenHARSI;
End
Else
If CurrentBar > 1 AND i_lenHARSI > 0 Then Begin
UpAmt1 = H[0] - H[1];
If UpAmt1 >= 0 Then
DownAmt1 = 0;
Else Begin
DownAmt1 = -UpAmt1;
UpAmt1 = 0;
End;
UpAvg1 = (UpAvg1[1] * (i_lenHARSI - 1) + UpAmt1) / i_lenHARSI;
DownAvg1 = (DownAvg1[1] * (i_lenHARSI - 1) + DownAmt1) / i_lenHARSI;
End;
If UpAvg1 + DownAvg1 <> 0 Then
RSIV1 = 100 * UpAvg1 / (UpAvg1 + DownAvg1);
Else
RSIV1 = 0;
If CurrentBar == 1 AND i_lenHARSI > 0 Then Begin
UpSum2 = 0;
DownSum2 = 0;
For cnt = 0 To i_lenHARSI - 1 Begin
UpAmt2 = L[cnt] - L[cnt+1];
If UpAmt2 >= 0 Then
DownAmt2 = 0;
Else Begin
DownAmt2 = -UpAmt2;
UpAmt2 = 0;
End;
UpSum2 = UpSum2 + UpAmt2;
DownSum2 = DownSum2 + DownAmt2;
End;
UpAvg2 = UpSum2 / i_lenHARSI;
DownAvg2 = DownSum2 / i_lenHARSI;
End
Else
If CurrentBar > 2 AND i_lenHARSI > 0 Then Begin
UpAmt2 = L[0] - L[1];
If UpAmt2 >= 0 Then
DownAmt2 = 0;
Else Begin
DownAmt2 = -UpAmt2;
UpAmt2 = 0;
End;
UpAvg2 = (UpAvg2[1] * (i_lenHARSI - 1) + UpAmt2) / i_lenHARSI;
DownAvg2 = (DownAvg2[1] * (i_lenHARSI - 1) + DownAmt2) / i_lenHARSI;
End;
If UpAvg2 + DownAvg2 <> 0 Then
RSIV2 = 100 * UpAvg2 / (UpAvg2 + DownAvg2);
Else
RSIV2 = 0;
_highRSI_raw = RSIV1-50;
_lowRSI_raw = RSIV2-50;
_highRSI = max(_highRSI_raw, _lowRSI_raw);
_lowRSI = min(_highRSI_raw, _lowRSI_raw);
_close = (_openRSI + _highRSI + _lowRSI + _closeRSI) / 4;
_open = iff(isnan(_open[i_smoothing]) == true, (_openRSI + _closeRSI) / 2 , (_open[1] * i_smoothing + _close[1]) / (i_smoothing + 1));
_high = max(_highRSI, max(_open, _close));
_low = min(_lowRSI, min(_open, _close));
bodyColour = iff(_close > _open , i_colUp , i_colDown);
wickColour = i_colWick;
var1 = TL_New_Self(sDate,sTime,_open,sDate,sTime,_close);
var2 = TL_New_Self(sDate,sTime,_high,sDate,sTime,max(_open,_close));
var3 = TL_New_Self(sDate,sTime,_Low,sDate,sTime,min(_open,_close));
TL_SetColor(var1,bodyColour);
TL_SetColor(var2,i_colWick);
TL_SetColor(var3,i_colWick);
TL_SetSize(var1,6);
TL_SetSize(var2,1);
TL_SetSize(var3,1);
2025-02-28
418
글번호 188677
답변완료
파라볼릭 크기
Input : af(0.02), maxAF(0.2);
var : T(0),B(0),S(0),tx(0),txx(0),TL(0),box(0);
var : HH(0),LL(0),B1(0),B2(0),B3(0),B4(0),S1(0),S2(0),S3(0),S4(0),H1(0),H2(0),H3(0),H4(0),L1(0),L2(0),L3(0),L4(0);
var1 = CSar(af,maxAF);
if CrossUp(C,var1) Then
{
T = 1;
B = var1;
B1 = B[1];
B2 = B1[1];
B3 = B2[1];
B4 = B3[1];
HH = H;
H1 = HH[1];
H2 = H1[1];
H3 = H2[1];
H4 = H3[1];
if abs(S-LL) < 0.7 Then
Text_Delete(tx);
tx = Text_New(sDate,sTime,HH,NumToStr(abs(HH-B),2));
Text_SetColor(tx,Red);
Text_SetSize(tx,25);
Text_SetStyle(tx,1,1);
Text_SetBold(tx,1);
box = Box_New(sDate,sTime,B,NextBarSdate,NextBarStime,HH);
Condition1 = False;
Condition3 = False;
Condition5 = False;
}
if CrossDown(C,var1) Then
{
T = -1;
S = var1;
S1 = S[1];
S2 = S1[1];
S3 = S2[1];
S4 = S3[1];
LL = L;
L1 = LL[1];
L2 = L1[1];
L3 = L2[1];
L4 = L3[1];
if abs(B-HH) < 0.7 Then
Text_Delete(tx);
tx = Text_New(sDate,sTime,LL,NumToStr(abs(LL-S),2));
Text_SetColor(tx,Blue);
Text_SetSize(tx,25);
Text_SetStyle(tx,1,0);
Text_SetBold(tx,1);
box = Box_New(sDate,sTime,S,NextBarSdate,NextBarStime,LL);
Condition2 = False;
Condition4 = False;
Condition6 = False;
}
Else
{
if T == 1 Then
{
if H > HH Then
HH = H;
Text_SetString(tx,NumToStr(abs(HH-B),2));
Text_SetLocation(tx,sDate,sTime,HH);
Box_SetEnd(box,NextBarSdate,NextBarStime,hh);
if HH < B+0.4 Then
{
Box_SetColor(box,Magenta);
Box_SetFill(box,true,90);
}
Else if HH >= B+0.4 and HH < B+0.5 Then
{
Box_SetColor(box,Gold);
Box_SetFill(box,true,150);
}
Else if HH >= B+0.5 and HH < B+0.65 Then
{
Box_SetColor(box,Orange);
Box_SetFill(box,true,100);
}
Else if HH >= B+0.65 and HH < B+0.8 Then
{
Box_SetColor(box,Pink);
Box_SetFill(box,true,120);
}
Else if HH >= B+0.8 and HH < B+1.2 Then
{
Box_SetColor(box,Magenta);
Box_SetFill(box,true,50);
}
Else if HH >= B+1.2 and HH < B+1.9 Then
{
Box_SetColor(box,Gray);
Box_SetFill(box,true,60);
}
Else
{
Box_SetColor(box,Pink);
Box_SetFill(box,true,90);
}
if B1 > 0 and B3 > B4 and H > H1 and H1 > H2 and H2 > H3 and H3 > H4 and Condition3 == False Then
{
Condition3 = true;
Buy();
txx = Text_New(sdate,sTime,H-0.7,"■");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Green);
Text_SetSize(txx,40);
}
if B1 > 0 and B >= B1 and H > H1 and B1 > B2 and H1 > H2 and Condition1 == False Then
{
Condition1 = true;
Buy();
txx = Text_New(sdate,sTime,H-0.7,"●");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Blue);
Text_SetSize(txx,35);
}
if Condition5 == False and var1 >= B+1.9 Then
{
Condition5 = true;
TL_New(sDate,sTime,0,sDate,sTime,999999999);
}
}
if T == -1 Then
{
if L < LL Then
LL = L;
Text_SetString(tx,NumToStr(abs(LL-S),2));
Text_SetLocation(tx,sDate,sTime,LL);
Box_SetEnd(box,NextBarSdate,NextBarStime,LL);
if LL > S-0.4 Then
{
Box_SetColor(box,Lime);
Box_SetFill(box,true,120);
}
Else if LL <= S-0.4 and ll > S-0.5 Then
{
Box_SetColor(box,Cyan);
Box_SetFill(box,true,150);
}
Else if LL <= S-0.5 and ll > S-0.65 Then
{
Box_SetColor(box,Blue);
Box_SetFill(box,true,50);
}
Else if LL <= S-0.65 and ll > S-0.8 Then
{
Box_SetColor(box,Yellow);
Box_SetFill(box,true,100);
}
Else if LL <= S-0.8 and ll > S-1.2 Then
{
Box_SetColor(box,Lime);
Box_SetFill(box,true,100);
}
Else if LL <= S-1.2 and ll > S-1.6 Then
{
Box_SetColor(box,Cyan);
Box_SetFill(box,true,100);
}
Else if LL <= S-1.6 and ll > S-1.9 Then
{
Box_SetColor(box,Blue);
Box_SetFill(box,true,30);
}
Else
{
Box_SetColor(box,Yellow);
Box_SetFill(box,true,100);
}
if S1 > 0 and S3 < S4 and L < L1 and L1 < L2 and L2 < L3 and L3 < L4 and Condition4 == False Then
{
Condition4 = true;
Buy();
txx = Text_New(sdate,sTime,L+0.7,"■");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Black);
Text_SetSize(txx,40);
}
if S1 > 0 and S <= S1 and L < L1 and S1 < S2 and L1 < L2 and Condition2 == False Then
{
Condition2 = true;
Buy();
txx = Text_New(sdate,sTime,L+0.7,"●");
Text_SetStyle(txx,2,2);
Text_SetColor(txx,Red);
Text_SetSize(txx,35);
}
if Condition6 == False and var1 <= B-1.9 Then
{
Condition6 = true;
TL_New(sDate,sTime,0,sDate,sTime,999999999);
}
}
}
if MarketPosition == 1 and BarsSinceEntry == 1 Then ExitLong();
if MarketPosition == -1 and BarsSinceEntry == 1 Then ExitShort();
하락은 노란색박스, 상승은 핑크색 박스에서 세로선이 모두 표시되어야 하는데 안나옵니다.
파라볼릭 크기가 1.9p 되는 지점에서만 세로선. 확인 부탁드립니다.
2025-02-28
435
글번호 188676