답변완료
문의 드립니다
수고 하십니다.
첨부 그림처럼
TL1과 TL2사이를 색으로 채우려면 어떻게 해야 하나요?
수고하세요.
#### 당일 시가 ######################################################
var : dop1(0), TL1(0);
var : 당일시가(0) ;
input :추세선두께1(3),추세선색상1(black) ;
당일시가 = DayOpen(0) ;
##시가를 숫자로 표시
Text_Delete(dop1);
dop1 = Text_New(sdate,stime,당일시가,NumToStr(당일시가,2));
if bdate != bdate[1] then
{
##시가라인 표시
TL_Delete(TL1);
TL1 = TL_new(sdate,stime,당일시가,NextBarSdate,NextBarStime,당일시가);
//TL = TL_new(sdate,stime,dayopen,NextBarSdate,NextBarStime,dayopen);
TL_setExtRight(TL1,true);
TL_setExtLeft(TL1,true);
TL_SetSize(TL1,추세선두께1);
TL_SetColor(TL1,추세선색상1);
}
#### 당일 현재가 #############################################
Var : 현재가3(0), TL2(0);
var : tpstC(0);
input :현재가TL두께3(1);
현재가3 = c;
##라인 표시
TL_Delete(TL2);
TL2 = TL_new(sdate,stime,현재가3, NextBarSdate,NextBarStime,현재가3);
//TL = TL_new(sdate,stime,dayopen,NextBarSdate,NextBarStime,dayopen);
TL_setExtRight(TL2,true);
TL_setExtLeft(TL2,true);
TL_SetSize(TL2,현재가TL두께3);
if c>o Then
TL_SetColor(TL2,red);
if c==o Then
TL_SetColor(TL2,black);
if c<o Then
TL_SetColor(TL2,blue);
2022-11-08
722
글번호 163638
지표
답변완료
문의 드립니다
1.
300분봉 매매에서 청산시간을 임의대로 지정하는게 가능한지요.
해외선물이 섬머타임으로 8시 시작이면 특정시간을 지정해서 청산식이 안될듯하고
300분봉의 특성상 5시간 마디로 시간설정을해서 청산시간이 정해지는거
아닌가 생각해서 문의드립니다.
아래 수식어에서
매매시간 (13 :00 ~ 익일 04 :00 ) , 청산시간 익일 04 :00
포함한 수식어로 부탁드립니다.
input : starttime(130000),endtime(400000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
}
if h > hh Then
hh = h;
if l < ll Then
ll = l;
if tcond == true and h1 > 0 and l1 > 0 then
{
if crossup(C,l1+(h1-l1)*1.236+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*1.000+PriceScale*n) Then
buy();
if crossup(C,l1-(h1-l1)*0.618+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.500+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.236+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*0.000+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*-0.236+PriceScale*n) Then
buy();
if crossup(C,l1+(h1-l1)*-0.382+PriceScale*n) Then
buy();
if CrossDown(C,l1+(h1-l1)*1.236-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*1.000-PriceScale*n) Then
sell();
if CrossDown(C,l1-(h1-l1)*0.618-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.500-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*0.236-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*-0.000-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*-0.236-PriceScale*n) Then
sell();
if CrossDown(C,l1+(h1-l1)*-0.382-PriceScale*n) Then
sell();
}
if MarketPosition == 1 then
{
if crossup(c,h1+PriceScale*10) Then
exitlong();
if CrossDown(c,l1-PriceScale*10) Then
exitlong();
}
if MarketPosition == -1 then
{
if crossup(c,h1+PriceScale*10) Then
ExitShort();
if CrossDown(c,l1-PriceScale*10) Then
ExitShort();
}
2.
아래 수식어는 180분봉 매매자료입니다.
매수 매도 각각 진입2회및 손절 100틱을 추가로 부탁드립니다.
input : starttime(110000),endtime(500000),n(30);
var : Tcond(false),hh(0),h1(0),ll(0),l1(0);
if (sdate != sdate[1] and stime >= endtime) or
(sdate == sdate[1] and stime >= endtime and stime[1] < endtime) then
{
Tcond = false;
if MarketPosition == 1 Then
ExitLong("bx");
if MarketPosition == -1 Then
ExitShort("sx");
}
if (sdate != sdate[1] and stime >= starttime) or
(sdate == sdate[1] and stime >= starttime and stime[1] < starttime) then
{
Tcond = true;
hh = h;
ll = l;
h1 = hh[1];
l1 = ll[1];
}
if NextBarSdate == sDate Then
{
if NextBarOpen >= C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*20);
Sell("s2",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen <= C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+10);
if NextBarSdate == sDate Then
{
if NextBarOpen <= C Then
{
Buy("b3",AtStop,NextBarOpen+PriceScale*20);
Sell("s3",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen >= C Then
{
ExitLong("bx3",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx3",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("ssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("ssss1",AtStop,EntryPrice+10); }
if NextBarSdate != sDate Then
{
if NextBarOpen <= C Then
{
Buy("b4",AtStop,NextBarOpen+PriceScale*20);
Sell("s4",AtStop,NextBarOpen-PriceScale*20);
}
if NextBarOpen >= C Then
{
ExitLong("bx4",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx4",AtStop,NextBarOpen+PriceScale*10);
}
if MarketPosition > 1 Then
Sell("sssss",AtStop,EntryPrice-10);
if MarketPosition < -1 Then
Buy("sssss1",AtStop,EntryPrice+10); }
3.
해외선물매매에서 150분봉 캔들의 완성시 고점과 저점이 높아지는 150분봉 캔들이
6회 상승시 매도 , 150분봉 캔들 고점 저점이 낮아지는 4회 하락시 청산되는 수식어
손절40틱 매매시간 08:00~익일 06:00 미청산시 익일 06:00시 동시청산
4.
해외선물매매에서 150분봉 캔들의 완성시 고점과 저점이 낮아지는 150분봉 캔들이
6회 하락시 매수 , 150분봉 캔들 고점 저점이 높아지는 3회 상승시 청산되는 수식어
손절40틱 매매시간 08:00~익일 06:00 미청산시 익일 06:00시 동시청산
5.
해외선물매매에서 150분봉 캔들의 완성시 고점과 저점이 낮아지는 150분봉 캔들이
3회 하락시 매수 , 150분봉 캔들 고점 저점이 높아지는 6회 상승시 청산되는 수식어
손절40틱 매매시간 08:00~익일 06:00 미청산시 익일 06:00시 동시청산
6.
해외선물매매에서 150분봉 캔들의 완성시 고점과 저점이 낮아지는 150분봉 캔들이
3회 상승시 매도 , 150분봉 캔들 고점 저점이 낮아지는 6회 하락시 청산되는 수식어
손절40틱 매매시간 08:00~익일 06:00 미청산시 06:00시 동시청산
2022-11-09
795
글번호 163631
시스템