커뮤니티

macd

프로필 이미지
고성
2026-02-02 11:37:57
23
글번호 230246
답변완료

첨부 이미지

연이어 자주 발생되는 신호 줄이고자, 신호후 25봉 이후에만 재신호 설정했으나,

세로선은 정상인데 매수신호는 원래대로 안 줄어들고 신호. (선물 5틱차트)

세로선과 신호 일치 바랍니다.

Input : shortPeriod(48), longPeriod(104), Period(27);

Var : MACDv(0), MACDsig(0),HH(0),LL(0),T(0),TL(0),Box(0),s1(0),s2(0);

MACDv = MACD(shortPeriod, longPeriod);

MACDsig = ma(MACDv,Period);

if macdv > macdsig [1] Then

T = 1;

HH = H;

if macdv < macdsig [1] Then

T = -1;

LL = L;

Condition1 = TotalTrades >= 1 and BarsSinceEntry(1) < 25 ;

if T == 1 and T != T[1] and MACDsig <= -0.1 and L <= highest(H,1000)-2 Then

{

if Condition1 == False Then

TL = TL_New(sDate,sTime,L+1,sDate,sTime,L+3.5);

TL_SetColor(TL,Blue);

TL_SetSize(TL,1);

Buy();

}

if MarketPosition == 1 and BarsSinceEntry == 1 Then ExitLong();

시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2026-02-02 12:45:46

안녕하세요 예스스탁입니다. Input : shortPeriod(48), longPeriod(104), Period(27); Var : MACDv(0), MACDsig(0),HH(0),LL(0),T(0),TL(0),Box(0),s1(0),s2(0); MACDv = MACD(shortPeriod, longPeriod); MACDsig = ma(MACDv,Period); if macdv > macdsig [1] Then { T = 1; HH = H; } if macdv < macdsig [1] Then { T = -1; LL = L; } Condition1 = TotalTrades >= 1 and BarsSinceEntry(1) < 25 ; if Condition1 == False and T != T[1] and MACDsig <= -0.1 and L <= highest(H,1000)-2 Then { TL = TL_New(sDate,sTime,L+1,sDate,sTime,L+3.5); TL_SetColor(TL,Blue); TL_SetSize(TL,1); Buy(); } if MarketPosition == 1 and BarsSinceEntry == 1 Then ExitLong(); 즐거운 하루되세요