답변완료
문의 드립니다.
input : StartTime(90000),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);
}
}
Inputs: VtyPercent(0.05),ATRperiod(5);
If MarketPosition() <> 1 Then
Buy ("Vty_LE", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() <> -1 Then
Sell ("Vty_SE)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == 1 Then
Buy ("Vty_LE1", AtStop, Close + (VtyPercent * ATR(ATRperiod)));
If MarketPosition() == -1 Then
Sell ("Vty_SE1)", AtStop, Close - (VtyPercent * ATR(ATRperiod)));
그래프의 형광색 체결데이터는 있는데 잔고가 없습니다.
수식이 잘못된건지 문의 드리고 당일 목표수익 100틱후 매매정지를
추가로 부탁드립니다.
2022-12-16
1340
글번호 164625
시스템
답변완료
수정부탁드립니다
실시간 표현이(분봉별로 일부표현이 안되는분봉이 있습니다
input :Peod(10),색상두께(50);
Var:상승색a(Red), 하락색a(LimE);
Var:jr(0),GGT(0);
Var: 고11(0),고12(0),시간11(0),시간12(0),선TL1(0),선TL(0),
고21(0),고22(0),시간21(0),시간22(0),Vlue11(0),Vlue12(0),
고31(0),고32(0),시간31(0),시간32(0);
Array:고Val[20](0),저val[20](0),고Bar[20](0),저Bar[20](0);
Array:dr[7](0),dfr[7](0);
var : dbox(0),dbox1(0);
dr[0] = 0;
dr[1] = 2;
dr[2] = 3.;
dr[3] = -1;
dr[4] = -2.;
dr[5] = 1;
dr[6] = 0.5;
For jr = 0 To 19
{
고Bar[jr] = 고Bar[jr] + 1;
저Bar[jr] = 저Bar[jr] + 1;
}
if crossup(c,highest(H,Peod)[1]) Then
GGT = 1;
if CrossDown(c,Lowest(L,Peod)[1]) Then
GGT = -1;
If GGT == -1 Then
{
If GGT[1] != -1 Then
{
For jr = 18 DownTo 0
{
저val[jr+1] = 저val[jr];
저Bar[jr+1] = 저Bar[jr];
//ZZ[j+1] = ZZ[j];
}
저val[0] = L;
저Bar[0] = 0;
//ZZ[0] = L;
고11 = Date[고Bar[0]];
시간11 = stime[고Bar[0]];
Vlue11 = 고Val[0];
고12 = Date[저Bar[0]];
시간12 = stime[저Bar[0]];
Vlue12 = 저val[0];
고21 = Date[고Bar[0]];
시간21 = stime[고Bar[0]];
고22 = Date[0];
시간22 = stime[0];
for jr = 0 to 6
{
dfr[jr] = 저val[1] + ((고Val[0] - 저val[1]) * dr[jr]);
}
Box_SetEnd(dbox,고11,시간11,Vlue11);
dbox = box_new(고11,시간11,Vlue11,고12,시간12,Vlue12);
Box_SetColor(dbox,하락색a);
Box_SetFill(dbox,true,색상두께);
// Sell();
}
If 저val[0] > L Then
{
저val[0] = L;
저Bar[0] = 0;
//ZZ[0] = L;
고12 = Date[저Bar[0]];
시간12 = stime[저Bar[0]];
Vlue12 = 저val[0];
고22 = Date[0];
시간22 = stime[0];
// Box_SetEnd(dbox,고12,시간12,Vlue12);
Box_SetEnd(dbox,NextBarSdate,NextBarStime,Vlue12);
}
}
If GGT == 1 Then
{
If GGT[1] != 1 Then
{
For jr = 18 DownTo 0
{
고Val[jr+1] = 고Val[jr];
고Bar[jr+1] = 고Bar[jr];
//ZZ[j+1] = ZZ[j];
}
고Val[0] = H;
고Bar[0] = 0;
//ZZ[0] = H;
고11 = Date[저Bar[0]];
시간11 = stime[저Bar[0]];
Vlue11 = 저val[0];
고12 = Date[고Bar[0]];
시간12 = stime[고Bar[0]];
Vlue12 = 고Val[0];
고31 = Date[저Bar[0]];
시간31 = stime[저Bar[0]];
고32 = Date[0];
시간32 = stime[0];
for jr = 0 to 5
{
dfr[jr] = 저val[0] + ((고Val[1] - 저val[0]) * dr[jr]);
}
Box_SetEnd(dbox,고11,시간11,Vlue11);
dbox = box_new(고11,시간11,Vlue11,고12,시간12,Vlue12);
Box_SetColor(dbox,상승색a);
Box_SetFill(dbox,true,색상두께);
// Buy();
}
If 고Val[0] < H Then
{
고Val[0] = H;
고Bar[0] = 0;
//ZZ[0] = H;
고12 = Date[고Bar[0]];
시간12 = stime[고Bar[0]];
Vlue12 = 고Val[0];
고32 = Date[0];
시간32 = stime[0];
// Box_SetEnd(dbox,고12,시간12,Vlue12);
Box_SetEnd(dbox,NextBarSdate,NextBarStime,Vlue12);
}
}
2022-12-15
992
글번호 164624
지표