답변완료
문의 드립니다
1.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
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);
}
}
If MarketPosition() <> 1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> 1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
---------------------------------------------------
2.
Inputs: VtyPercent(0.10),ATRperiod(10);
input : StartTime(210000),EndTime(60000);
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);
}
}
If MarketPosition() <> -1 Then
Buy ("LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitLong ("SE1", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
ExitShort ("LE2", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
sell ("SE2", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
시장가로 주문 설정을 하였는데 시세급변으로 주문거부가 나서 체결이 안될 경우
설정창에서 자동정정주문을 설정하면 기존 주문은 취소가 되고 해당되는 초 후에
당시의 상대호가 설정한 호가에 주문이 다시 나가는 지 궁금합니다.
그리고 위 수식어 2개의 수정을 바랍니다.
손절 -100틱 추가 및 손절 체결전 호가주문창에 보이도록
할수있는지 문의 드립니다.
2025-02-13
421
글번호 188102
시스템
답변완료
박스 수식 부탁드립니다
아래 추세선 수식의 변곡점을 박스 수식으로 부탁드립니다
================================================================================
input : Period(35),선두께(2);
Var:상승색(Turquoise), 하락색(Turquoise);
Var:j(0),T(0);
Var: date11(0),date12(0),time11(0),time12(0),TL1(0),TL(0),tl9(0),
date21(0),date22(0),time21(0),time22(0),
date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0);
Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0);
Array:r[7](0),fr[7](0),TL2[7](0),TL3[7](0),TX2[7](0),TX3[7](0);
Plot1(0);
For j = 0 To 19
{
HiBar[j] = HiBar[j] + 1;
LoBar[j] = LoBar[j] + 1;
}
if weekhigh(0)[1] < weekhigh(0) Then
T = 1;
if weekLow(0)[1] > weekLow(0) Then
T = -1;
If T == -1 Then
{
If T[1] != -1 Then
{
For j = 18 DownTo 0
{
LoVal[j+1] = LoVal[j];
LoBar[j+1] = LoBar[j];
}
LoVal[0] = L;
LoBar[0] = 0;
date11 = date[HiBar[0]];
time11 = stime[HiBar[0]];
Value11 = HiVal[0];
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,하락색);
date21 = date[HiBar[0]];
time21 = stime[HiBar[0]];
date22 = date[0];
time22 = stime[0];
for j = 0 to 6
{
fr[j] = LoVal[1] + ((HiVal[0] - LoVal[1]) * r[j]);
}
}
If LoVal[0] > L Then
{
LoVal[0] = L;
LoBar[0] = 0;
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date22 = date[0];
time22 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
}
}
If T == 1 Then
{
If T[1] != 1 Then
{
For j = 18 DownTo 0
{
HiVal[j+1] = HiVal[j];
HiBar[j+1] = HiBar[j];
}
HiVal[0] = H;
HiBar[0] = 0;
date11 = date[LoBar[0]];
time11 = stime[LoBar[0]];
Value11 = LoVal[0];
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
TL1 = TL_New(date11,time11,Value11,date12,time12,Value12);
TL_SetColor(TL1,상승색);
date31 = date[LoBar[0]];
time31 = stime[LoBar[0]];
date32 = date[0];
time32 = stime[0];
for j = 0 to 5
{
fr[j] = LoVal[0] + ((HiVal[1] - LoVal[0]) * r[j]);
}
}
If HiVal[0] < H Then
{
HiVal[0] = H;
HiBar[0] = 0;
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
TL_SetEnd(TL1, date12,time12,Value12);
date32 = date[0];
time32 = stime[0];
TL_Delete(tl);
TL = TL_New(sdate,stime,Value12,NextBarSdate,NextBarStime,NextBarOpen);
}
}
TL_SetSize(TL1,선두께);
TL_SetDrawMode(TL1,0);
2025-02-13
462
글번호 188101
지표
답변완료
시스템 오류
당일청산으로는 신호가 안나옵니다.
input : P(9);
var : RSIV(0),T(0),TL1(0),TL2(0);
var : HIV(0),HIV1(0),HPV(0),HPV1(0);
var : LIV(0),LIV1(0),LPV(0),LPV1(0);
RSIv = RSI(P);
if RSIV > RSIV[1] Then
T = 1;
if rSIV < RSIV[1] Then
T = -1;
if T == 1 and T != T[1] Then
{
HIV = RSIv;
HIV1 = HIV[1];
HPV = H;
HPV1 = HPV[1];
if LIV > LIV1 and LPV < LPV1 and LPV1 > 0 Then
{
TL1 = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL2 = TL_New_Self(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL1,RED);
TL_SetColor(TL2,RED);
TL_SetDrawMode(TL1,0);
TL_SetDrawMode(TL2,0);
}
}
if T == -1 and T != T[1] Then
{
LIV = RSIv;
LIV1 = LIV[1];
LPV = L;
LPV1 = LPV[1];
if HIV < HIV1 and HPV > HPV1 and HPV1 > 0 Then
{
TL1 = TL_New(sDate,sTime,0,sDate,sTime,99999999);
TL2 = TL_New_Self(sDate,sTime,0,sDate,sTime,99999999);
TL_SetColor(TL1,BLUE);
TL_SetColor(TL2,BLUE);
TL_SetDrawMode(TL1,0);
TL_SetDrawMode(TL2,0);
}
}
#RSI 상승구간 RSI최고와 가격최고 계산
if T == 1 Then
{
if RSIv > HIV Then
{
HIV = RSIv;
}
if H > HPV Then
{
RSIv = H;
}
}
#RSI 하락구간 RSI최저와 가격최저 계산
if T == -1 Then
{
if RSIv < LIV Then
{
LIV = RSIv;
}
if L < LPV Then
{
LPV = L;
}
}
if CrossDown(RSIV,70) Then
Sell();
if Crossup(RSIV,30) Then
Buy();
2025-02-13
436
글번호 188095
시스템
답변완료
문의 드립니다.
안녕하세요~아래의 트레이딩뷰 수식이 예스트레이더 수식으로 바꿔질까요?
항상 감사드립니다.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © HeWhoMustNotBeNamed
//@version=4
study("ATR Percentage")
useAtrAsPercent = input(true)
ATRPeriods = input(22, step=5)
showBollingerBands = input(true)
BBPeriods = input(20, step=10)
StdDev = input(2, step=0.5)
atr = atr(ATRPeriods)
atrPercent = (atr/close) * 100
[middle, top, bottom] = bb(useAtrAsPercent? atrPercent:atr,BBPeriods,StdDev)
plot(useAtrAsPercent? atrPercent:atr, title="ATR/Percent", color=color.blue, linewidth=2)
BBup = plot(showBollingerBands ? top: na, title="Top", color=color.red, linewidth=1, transp=50, style=plot.style_linebr)
BBdown = plot(showBollingerBands ? bottom: na, title="Bottom", color=color.green, linewidth=1, transp=50, style=plot.style_linebr)
BBmid = plot(showBollingerBands ? middle: na, title="Middle", color=color.purple, linewidth=1, transp=50, style=plot.style_linebr)
fill(BBup, BBmid, title="High Volatility Zone", color=color.red, transp=90)
fill(BBdown, BBmid, title="Low Volatility Zone", color=color.green, transp=90)
2025-02-12
479
글번호 188089
지표