답변완료
수식 수정 의뢰 드립니다.
안녕하세요!
아래 수식은 지난번에 만들어 주셔서 잘 사용하고 있습니다.
아래 수식에 전일 고가, 저가, 종가, 시가를 선으로 나타나도록 수식을 수정해 주시길 요청드립니다.
또한 당일 진폭값을 수치로 우측 하단쪽에 나타나도록 수정해 주시길 요청드립니다.
감사합니다.
var : v1(0),v2(0),atm(0),cnt(0),value(0);
Array : TL[20](0),TX[20](0);
if NextBarBdate != Bdate Then
{
v1 = Floor(NextBarOpen/2.5)*2.5;
v2 = C-v1;
if v2 > 2.5/2 Then
atm = v1+2.5;
Else
atm = v1;
value = ATM-2.5*5;
For cnt = 0 to 20
{
TL_Delete(TL[cnt]);
TL[cnt] = TL_New(sDate,sTime,value+1.25*cnt,NextBarSdate,NextBarStime,value+1.25*cnt);
TL_SetExtLeft(TL[cnt],true);
TL_SetExtRight(TL[cnt],true);
TL_SetColor(TL[cnt],IFf(cnt%2==0,Black,Gray));
TL_SetSize(TL[cnt],IFf(cnt%2==0,1,0));
TL_SetStyle(TL[cnt],IFf(cnt%2==0,1,3));
Text_Delete(TX[cnt]);
TX[cnt] = Text_New(NextBarSdate,NextBarStime,value+1.25*cnt," "+NumToStr(value+1.25*cnt,2));
Text_SetStyle(TX[cnt],0,1);
}
}
Else
{
For cnt = 0 to 20
{
Text_SetLocation(TX[cnt],NextBarSdate,NextBarStime,value+1.25*cnt);
}
}
2025-03-27
307
글번호 189621
지표
답변완료
문의
아래 청산수식을 검토해주십시요.
문제점은 inactivity 청산에서 확인됩니다.
(손절,추적스탑,익절은 구별이 힘든데 최소가격변화는 빈도가 적어서 문제를 발견했습니다)
청산수식 전체에 문제가 있을 거 같습니다.
첨부파일은 inactivity 청산내역입니다.(별첨1,2)
inactivity 수식은 b1과 s1에는 없고 b2,b3와 s2,s3 수식에만 있는데
b1과 s1 청산결과에 나타납니다.(별첨1)
s3를 시뮬레이션하면 값들이 나오는데 inactivity 청산결과는 없습니다.(별첨2)
*진입내용
b1과 s1은 리버스 거래
b2는 고점돌파(직전 포지션 매수)
b3는 고점돌파(직전 포지션 매도)
s2는 저점돌파(직전 포지션 매수)
s3는 저점돌파(직전 포지션 매도)
*진입순서(b1,s1 신호가 모두 나온 후 고점이나 저점을 돌파할 때)
b1-s1-b3 1차 매수 / 2차 매도 / 3차 고점돌파
b1-s1-s3 1차 매수 / 2차 매도 / 3차 저점돌파
s1-b1-b2 1차 매도 / 2차 매수 / 3차 고점돌파
s1-b1-s2 1차 매도 / 2차 매수 / 3차 저점돌파
항상 고맙습니다.
*******************************************************************************
input : ls1(2.75),gl1(8.75),tr1(2.75); // 1차 b1진입
input : ls4(1.75),gl4(6.75),tr4(1.75); // 2차 s1진입
input : ls2(1),gl2(7.75),tr2(2.5); // 1차 s1진입
input : ls3(1.75),gl3(999999),tr3(1.75); // 2차 b1진입
input : bbls(1),bbgl(999999),bbtr(1.75),b2mi(999999),b2bg(999999); // 3차 "b2"진입
input : bsls(1.75),bsgl(999999),bstr(3.25),b3mi(999999),b3bg(999999);// 3차 "b3"진입
input : sbls(3),sbgl(999999),sbtr(3),s2mi(4.5),s2bg(1200); // 3차 "s2"진입
input : ssls(1.5),ssgl(1.25),sstr(2.25),s3mi(7),s3bg(2000); // 3차 "s3"진입
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 1 and IsEntryName("b1") == true Then
{
//매수진입이 첫진입일때
if entry == 1 Then
{
SetStopLoss(ls1,PointStop);
SetStopProfittarget(gl1,PointStop);
SetStopTrailing(tr1,0,PointStop);
}
Else //매수진입이 두번째진입일때
{
SetStopLoss(ls3,PointStop);
SetStopProfittarget(gl3,PointStop);
SetStopTrailing(tr3,0,PointStop);
}
}
Else if MarketPosition == -1 and IsEntryName("s1") == true Then
{
//매도진입이 첫진입일때
if entry == 1 Then
{
SetStopLoss(ls2,PointStop);
SetStopProfittarget(gl2,PointStop);
SetStopTrailing(tr2,0,PointStop);
}
Else //매도진입이 두번째진입일때
{
SetStopLoss(ls4,PointStop);
SetStopProfittarget(gl4,PointStop);
SetStopTrailing(tr4,0,PointStop);
}
}
if MarketPosition== 1 Then //고점돌파시
{
if IsEntryName("b2") == true Then //직전 포지션 매수
{
SetStopLoss(bbls,PointStop);
SetStopProfittarget(bbgl,PointStop);
SetStopTrailing(bbtr,0,PointStop,1);
SetStopInactivity(b2mi,b2bg,PointStop);
}
Else if IsEntryName("b3") == true Then //직전 포지션 매도
{
SetStopLoss(bsls,PointStop);
SetStopProfittarget(bsgl,PointStop);
SetStopTrailing(bstr,0,PointStop,1);
SetStopInactivity(b3mi,b3bg,PointStop);
}
}
if MarketPosition== -1 Then //저점돌파시
{
if IsEntryName("s2") == true Then //직전 포지션 매수
{
SetStopLoss(sbls,PointStop);
SetStopProfittarget(sbgl,PointStop);
SetStopTrailing(sbtr,0,PointStop,1);
SetStopInactivity(s2mi,s2bg,PointStop);
}
Else if IsEntryName("s3") == true Then //직전 포지션 매도
{
SetStopLoss(ssls,PointStop);
SetStopProfittarget(ssgl,PointStop);
SetStopTrailing(sstr,0,PointStop,1);
SetStopInactivity(s3mi,s3bg,PointStop);
}
}
2025-03-27
311
글번호 189613
시스템
답변완료
수식 부탁드립니다
다음 수식의 변환을 부탁드립니다.
T=Ttsf(C,50);
H=shift((highest(high,midPeriod)+lowest(low,midPeriod))/2,midperiod-26);
TTD=eavg(T,100);
TT=(highest(TTD,shortPeriod)+lowest(TTD,shortPeriod)+highest(TTD,midPeriod)+lowest(TTD,midPeriod))/4;
TT;
TTT=TEMA(T,240);
TT2=(highest(TTT,longPeriod)+lowest(TTT,longPeriod))/2;
TT2;
CrossUp(C,TT) and CrossUp(C,TT2)
shortperiod 9
midperiod 26
longperiod 52
감사드립니다.
2025-03-27
249
글번호 189606
종목검색