답변완료
테스트 부탁드립니다.
답변 감사드립니다.
에코프로비엠 2월21일 테스트 입니다.
스탑로스후 이렇게 신호가 바로 발생하네요.
테스트 좀 부탁드립니다.
감사합니다.
즐거운하루 되세요
############################################################################
안녕하세요.
예스스탁 입니다.
2. 트레일링스탑 진입금지
- 추후에는 저희가 검증해볼 수 있도록 종목도 함께 알려주시면 감사하겠습니다.
Input : 시간(151800);
Var : Bcond(False);
if Bdate != Bdate[1] Then
{
Bcond = False;
}
if MarketPosition == 0 and
ExitDate(1) == sDate and
ExitName(1) == "StopTrailing" and
CrossUp(C, Ma(C, 5)) Then
{
Bcond = true;
}
if Bcond == False or (Bcond == true and sTime < 시간 and NextBarStime >= 시간) Then
Buy("b",AtMarket);
SetStopTrailing(10,10,PercentStop);
즐거운 하루 보내세요.
> 봉다리 님이 쓴 글입니다.
> 제목 : 재문의드립니다.
> 답변감사드립니다.
if
crossup(c,ma(c,5))
Then
Buy();
SetStopTrailing(10,10,PercentStop);
3분봉 식에서 위그림처럼, 신호발생시, 두번째 신호가 당일 마지막봉(동시호가제외) 시가에
신호가 발생되는 수식을 알고 싶습니다. 가능하지 않다면, 트레일링스탑후, 당일만 매매
금지하는 수식을 알고 싶습니다.
감사드립니다.
좋은하루 되세요
2023-02-23
1385
글번호 166527
시스템
답변완료
박스 저장
input : Period(120);
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),txx(0), vTL(0), vTL9(0),txxx(0),
date31(0),date32(0),time31(0),time32(0),tx(0),tx1(0),tl4(0),tx4(0);
Array:HiVal[20](0),LoVal[20](0),HiBar[20](0),LoBar[20](0);
var :box1(0),box2(0);
Plot1(value12);
For j = 0 To 19
{
HiBar[j] = HiBar[j] + 1;
LoBar[j] = LoBar[j] + 1;
}
if crossup(c,highest(H,Period)[1]) Then
T = 1;
if CrossDown(c,Lowest(L,Period)[1]) Then
T = -1;
If T == -1 Then
{
If T[1] != -1 Then
{
Box_Delete(box2);
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];
date21 = date[HiBar[0]];
time21 = stime[HiBar[0]];
date22 = date[0];
time22 = stime[0];
Condition88 = False;
if Condition88 ==False Then
{
if value12 <= value11-0.85 Then
{
Condition88 = true;
box1 = Box_New(date12,time12,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box1,Lime);
Box_SetFill(box1,true,30);
Box_SetExtFill(box1,true);
}
}
}
Else
{
If LoVal[0] > L Then
{
LoVal[0] = L;
LoBar[0] = 0;
date12 = date[LoBar[0]];
time12 = stime[LoBar[0]];
Value12 = LoVal[0];
date22 = date[0];
time22 = stime[0];
if Condition88 ==False Then
{
if value12 <= value11-0.85 Then
{
Condition88 = true;
box1 = Box_New(date12,time12,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box1,Lime);
Box_SetFill(box1,true,30);
Box_SetExtFill(box1,true);
}
}
}
if Condition88 == true Then
Box_SetEnd(box1,date12,time12,L);
}
}
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];
date31 = date[LoBar[0]];
time31 = stime[LoBar[0]];
date32 = date[0];
time32 = stime[0];
Condition99 = False;
if Condition99 ==False Then
{
if value12 >= value11+0.85 Then
{
Condition99 = true;
box2 = Box_New(date12,time12,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box2,Magenta);
Box_SetFill(box2,true,30);
Box_SetExtFill(box2,true);
}
}
}
Else
{
If HiVal[0] < H Then
{
HiVal[0] = H;
HiBar[0] = 0;
date12 = date[HiBar[0]];
time12 = stime[HiBar[0]];
Value12 = HiVal[0];
date32 = date[0];
time32 = stime[0];
if Condition99 == False Then
{
if value12 >= value11+0.85 Then
{
Condition99 = true;
box2 = Box_New(date12,time12,H,NextBarSdate,NextBarStime,L);
Box_SetColor(box2,Magenta);
Box_SetFill(box2,true,30);
Box_SetExtFill(box2,true);
}
}
}
if Condition99 == true Then
Box_SetEnd(box2,date12,time12,Value12);
}
}
추세선의 크기가 0.85p에 도달할 때부터 그 추세선이 끝나는 지점까지 박스를 표시했다가,
상승추세선에서 생성된 박스는 음전환시 모두 삭제하고,
하락추세선에서 생성된 박스는 양전환시 모두 저장하는 수식입니다.
박스 표시 크기 양호하고, 상승추세선 박스 음전환시 삭제도 양호합니다.
24줄에 있는 Box_Delete(box2); 를 삭제하고 보면 박스 생성은 완벽합니다.(파일참조)
다만, 하락추세선에서 생성된 박스의 양전환시 저장이 일부만 되고 대부분 안됩니다.
수정 부탁드립니다.
2023-02-21
1828
글번호 166526
지표
답변완료
수식 문의드립니다
안녕하세요
이평션별로 기울기 값을 변수로 입력하고자 합니다 변수 작성방법을 알려주세요
간격은 포인트로 표기하고자 합니다
모든 작은이평선과 큰이평선의 간격이 0.5포인트 때 매도 진입하고자 합니다 이 때 변수값 표기방법 구하기입니다
input : Period1(100),Period2(200),Period3(300),Period4(400),Period5(500),Period6(600),??????????,익절틱수s1(63),손절틱수1s1(91);
var : mav1(0),mav2(0),mav3(0),mav4(0),mav5(0),mav6(0);
mav1 = ma(c, Period1);
mav2 = ma(c, Period2);
mav3 = ma(c, Period3);
mav4 = ma(c, Period4);
mav5 = ma(c, Period5);
mav6 = ma(c, Period6);
var1 = abs(mav100-mav200);
var2 = abs(mav200-mav300);
var3 = abs(mav300-mav400);
var4 = abs(mav400-mav500);
var5 = abs(mav500-mav600);
if Tcond == true then
{
if MarketPosition >= 0 Then
if var1 > ?? and var2 > ?? and var3 > ?? and var4 > ?? and var5 > ?? and mav1[1] > mav1 Then
{
if CurrentContracts < 1 Then
sell("s1",OnClose,def,1);
}
if MarketPosition == -1 then
{
if mav1 < mav1 Then
{
ExitShort("s1-1",OnClose,def,"s1");
}
ExitShort("sp1",atlimit,AvgEntryPrice-PriceScale*익절틱수s1,"s1");
ExitShort("sl1",AtStop,AvgEntryPrice+PriceScale*손절틱수s1,"s1");
}
}
2023-02-22
1088
글번호 166525
시스템