답변완료
문의드립니다.
늘 감사합니다.
아래 수식에 당일수익 250틱 이상이면 진입금지
당일손실 -250틱 이상이면 진입금지
수정부탁드립니다.
/////////////////////////////////////////////////////////////////////
input : StartTime(210000),EndTime(045900);
var : Tcond(false);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
Tcond = true;
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
///////////////////////////////////////////////////////////////////////////////////////
input : Period(10);
var : Counter(0), Lowval(0), Highval(0), DownVel(0),UpVel(0), DnAroon(0),UpAroon(0) ;
Lowval= Lowest(Low, Period+1);
Highval = Highest(High, Period+1);
For counter= 0 To Period {
If Low[counter] == Lowval Then
DownVel = counter;
If High[counter] == highval Then
UpVel = counter;
}
UpAroon = 100*(Period-UpVel)/Period;
DnAroon = 100*(Period-DownVel)/Period;
if crossup(UpAroon,DnAroon) Then
buy("Aroon_LE");
if CrossDown(UpAroon,DnAroon) Then
sell("Aroon_SE");
2023-09-03
731
글번호 172079
시스템
답변완료
수식문의
안녕하세요
수고하십니다.
문의1) 아래수식에서
tx = text_new(sDate,sTime,L,"▲");가 출력되는 위치에서
Plot1(L,"매수"); 형식의 지표로 출력할 수 있도록 부탁드립니다.
문의2)
Plot1(L,"매수"); 형식의 지표가 출력되는 봉에 아래조건을 추가한 종목검색식
1.전일대비 3% 이상 상승한 양봉
2.거래량이 10만주 이상(전일거래량의 50% 이상)
3; 매도잔량이 매수잔량보다 큰 종목
Input : Change(240);
Array : HD[10](0),HT[10](0),HV[10](0);
Array : LD[10](0),LT[10](0),LV[10](0);
var : cnt(0),Hprice(0),Lprice(0);
var : UpTrend(false),DownTrend(False),Trend(0);
var : ZigZagTL(0),tx(0);
HPrice = H;
LPrice = L;
if Index == 0 Then
{
HD[0] = sDate;
HT[0] = sTime;
HV[0] = HPrice;
LD[0] = sDate;
LT[0] = sTime;
LV[0] = LPrice;
}
Else
{
UpTrend = HPrice >= Highest(HPrice,Change)[1];
DownTrend = LPrice <= Lowest(LPrice,Change)[1];
if trend <= 0 and UpTrend == true Then
{
trend = 1;
For cnt = 9 DownTo 1
{
HD[cnt] = HD[cnt-1];
HT[cnt] = HT[cnt-1];
HV[cnt] = HV[cnt-1];
}
HD[0] = sDate;
HT[0] = sTime;
HV[0] = HPrice;
TL_SetExtRight(ZigZagTL,False);
ZigZagTL = TL_New(LD[0],LT[0],LV[0],HD[0],HT[0],HV[0]);
TL_SetColor(ZigZagTL,Red);
TL_SetSize(ZigZagTL,1);
TL_SetExtRight(ZigZagTL,true);
Condition1 = False;
}
Else if trend >= 0 and DownTrend Then//하락추세 전환
{
trend = -1;
For cnt = 9 DownTo 1
{
LD[cnt] = LD[cnt-1];
LT[cnt] = LT[cnt-1];
LV[cnt] = LV[cnt-1];
}
LD[0] = sDate;
LT[0] = sTime;
LV[0] = LPrice;
TL_SetExtRight(ZigZagTL,False);
ZigZagTL = TL_New(HD[0],HT[0],HV[0],LD[0],LT[0],LV[0]);
TL_SetColor(ZigZagTL,Blue);
TL_SetSize(ZigZagTL,1);
TL_SetExtRight(ZigZagTL,true);
}
Else
{
if trend == 1 Then
{
if HPrice > HV[0] Then
{
HD[0] = sDate;
HT[0] = sTime;
HV[0] = HPrice;
TL_SetEnd(ZigZagTL,HD[0],HT[0],HV[0]);
}
if Condition1 == False and C > TL_GetValue(ZigZagTL,sDate,sTime) and TL_GetValue(ZigZagTL,sDate,sTime) > L Then
{
Condition1 = true;
tx = text_new(sDate,sTime,L,"▲");
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Red);
}
}
if trend == -1 Then
{
if LPrice < LV[0] Then
{
LD[0] = sDate;
LT[0] = sTime;
LV[0] = LPrice;
TL_SetEnd(ZigZagTL,LD[0],LT[0],LV[0]);
}
}
}
}
2023-09-03
1194
글번호 172077
지표