답변완료
macd box 지표쪽
Input : shortPeriod(36), longPeriod(78), Period(15),val(-0.08);
Var : MACDv(0), MACDsig(0),T(0),TL(0),Box(0);
MACDv = MACD(shortPeriod, longPeriod);
MACDsig = ma(MACDv,Period);
if macdsig > macdsig [1] Then
T = 1;
if macdsig < macdsig [1] Then
T = -1;
Plot1 (macdsig ,"macdsig",IFF(T == 1,Red,Blue));
plot2 (-0.08);
if T == 1 and T != T[1] and MACDsig <= val Then
{
TL = TL_New_Self(sDate,sTime,-0.08,sDate,sTime,999);
TL_SetColor(TL,Red);
TL_SetSize(TL,0.5);
}
Condition1 = macdsig <= val;
if Condition1 == true Then
{
if Condition1[1] == False Then
{
box = Box_New_Self(sDate,sTime,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box,Yellow);
Box_SetFill(box,true,70);
Box_SetExtFill(box,true);
TL = TL_New_Self(sDate,sTime,-0.08,sDate,sTime,999);
TL_SetColor(TL,Lime);
TL_SetSize(TL,3);
}
Else
Box_SetEnd(Box,NextBarSdate,NextBarStime,L);
}
전체 박스에서 차트 쪽은 지우고 지표 쪽만 박스 표시. 감사합니다.
2024-01-02
1076
글번호 175321
지표
답변완료
문의 드립니다
input : StartTime(0000),EndTime(0000);
input : 익절틱수(0),손절틱수(0);
var : Tcond(False),entry(0);
Variables: Mom(0);
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
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 (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
{
Tcond = False;
}
if Tcond == true Then
{
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
}
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*1 Then
{
Sell("s",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b1",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s1",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b2",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s2",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*1 Then
{
Buy("b3",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*1 Then
{
Sell("s3",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b4",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s4",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
if L ==lowest(L,1) and highest(H,3) >= lowest(L,2)+PriceScale*10 Then
{
Buy("b5",AtStop,(highest(H,3)+lowest(L,1))/2);
}
if MarketPosition == 1 and BarsSinceEntry == 9 Then
Sell();
if H == highest(H,1) and lowest(L,3) <= highest(H,2)+PriceScale*10 Then
{
Sell("s5",AtStop,(lowest(L,3)+highest(H,1))/2);
}
if MarketPosition == -1 and BarsSinceEntry == 9 Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
-----------------
위 수식어의 결과값을 첨부파일로 보면 참 만족스러운데 일봉매매의 특성상 현실적으로
전일잔고 미인식으로 귀사가 말씀하셨듯이 수식어의 일봉매매는 별 의미가 없습니다.
해서 장중 매매 신호발생시 미니 매수, 매도창에 2회클릭으로 체결이 되는 방법이 수식어
수정으로 가능한지 문의 해 봅니다.
이것이 불가하다면 매매신호의 음성인식후 마우스의 수동 조작이 된다면
어쩔수 없는 선택지로 받아 드리겠습니다.
2023-12-30
1241
글번호 175319
시스템
답변완료
data2 box
input : N(50),N1(10);
var : TL1(0),TL2(0),cnt(0),box(0),box1(0);
var : TX1(0),TX2(0),TL3(0),TL4(0),TL5(0),TL6(0),TL7(0);
For cnt = 0 to 49
{
TL_Delete(TL1[cnt]);
TL_Delete(TL2[cnt]);
TL_Delete(TL3[cnt]);
TL_Delete(TL4[cnt]);
TL_Delete(TL5[cnt]);
TL_Delete(TL6[cnt]);
TL_Delete(TL7[cnt]);
Text_Delete(TX1[cnt]);
Text_Delete(TX2[cnt]);
TL_Delete(Box[cnt]);
TL_Delete(Box1[cnt]);
}
TL1 = TL_New_Self(sDate,sTime,data2(highest(H,N)),NextBarSdate,NextBarStime,data2(highest(H,N)));
TL2 = TL_New_Self(sDate,sTime,data2(lowest(L,N)),NextBarSdate,NextBarStime,data2(lowest(L,N)));
TL_SetColor(TL1,Red);
TL_SetColor(TL2,Blue);
TL_SetSize(TL1,1);
TL_SetSize(TL2,1);
TL_SetExtLeft(TL1,true);
TL_SetExtLeft(TL2,true);
TL3 = TL_New_Self(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),-9999,Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),9999);
TL4 = TL_New_Self(Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999,Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),9999);
TL_SetColor(TL3,Pink);
TL_SetColor(TL4,Gold);
TL_SetSize(TL3,5);
TL_SetSize(TL4,2);
TL5 = TL_New(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),-9999,Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),9999);
TL6 = TL_New(Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999,Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),9999);
TL_SetColor(TL5,Pink);
TL_SetColor(TL6,Gold);
TL_SetSize(TL5,5);
TL_SetSize(TL6,2);
TL7 = TL_New_Self(sDate,sTime,data2(lowest(L*1.05,N)),NextBarSdate,NextBarStime,data2(lowest(L*1.05,N)));
TL_SetColor(TL7,Orange);
TL_SetSize(TL7,1);
TL_SetExtLeft(TL7,true);
TX1 = Text_New_Self(Data2(sDate[NthHighestBar(1,H,N)]),Data2(stime[NthhighestBar(1,H,N)]),Data2(highest(H+PriceScale*1,N)),"■");
TX2 = Text_New_Self(Data2(sDate[NthLowestBar(1,L,N)]),Data2(stime[NthLowestBar(1,L,N)]),Data2(Lowest(L-PriceScale*1,N)),"■");
Text_SetStyle(TX1,2,1);
Text_SetStyle(TX2,2,0);
Text_SetColor(TX1,Blue);
Text_SetColor(TX2,Magenta);
Text_SetSize(tx1,40);
Text_SetSize(tx2,40);
box1 = Box_New(Data2(sDate[NthlowestBar(1,L,N)+N1]),Data2(stime[NthlowestBar(1,L,N)+N1]),9999,
Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999);
Box_SetColor(box1,Blue);
Box_SetFill(box1,true,30);
box = Box_New_Self(Data2(sDate[NthlowestBar(1,L,N)+N1]),Data2(stime[NthlowestBar(1,L,N)+N1]),9999,
Data2(sDate[NthlowestBar(1,L,N)]),Data2(stime[NthlowestBar(1,L,N)]),-9999);
Box_SetColor(box,Blue);
Box_SetFill(box,true,25);
Plot1(Data2(c));
data2의 최근 50봉 중에서,
최저가 라인의 +5% 선을 봉의 "저가"가 상향 돌파하면(고가,종가 아님), 최저가 봉부터(TL4) 우측 연장 박스. 현재봉의 "저가"가 +5% 라인을 하향 붕괴하면 박스 삭제.
즉 현재봉의 저가가, 50봉 중 최저가보다 5% 위에 있을 때만 박스 존재.
최저가 봉이 수시로 변하므로, 박스도 그에 따라 수시로 변경.
박스 고저는 +5% 라인과(TL7) 50봉 중 최저가 라인(TL2).
(For cnt = 0 to 49). 50봉(N)을 100봉으로 변경하면 49를 99로 바꿔야 하나요?
감사합니다.
2023-12-31
1049
글번호 175316
지표