커뮤니티

날짜 와시간 표시 관련

프로필 이미지
블루3
2026-01-22 11:05:39
82
글번호 229984
답변완료

input : 시작일(20250701),시작시간(090000);

input : 이평1(60),이평2(60),이평3(240);

input : 윌리엄스R기간값(12);

input : 손절틱수(350),트레일링스탑틱수(100),목표틱수(300),청산틱수(300);

var : mav1(0),mav2(0),mav3(0),WR(0);


if sdate >= 시작일 and sTime >= 시작시간 Then

{

Condition1 = true;

Condition2 = true;

}


MAV1 = MA(c,이평1);

MAV2 = MA(c,이평2);

MAV3 = MA(c,이평3);

WR = WILLR(윌리엄스R기간값);


if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then

Condition2 = False;


if Condition1 == true Then

{

if MarketPosition == 0 and c < mav3 and CrossDown(WR, -20) Then

Sell("s");

if MarketPosition == -1 Then

{

if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*청산틱수 Then

if CrossUp(C,mav2) Then

ExitShort("sx");

}

if MarketPosition == -1 Then

{

if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then

ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);

}


SetStopLoss(PriceScale*손절틱수,PointStop);

}




날짜와 시간을 꼭 지정을 해야 되나요?


건건마다 날짜와 시간 지정없이 시스템을 작동된다면은 그에 따른 수식을 어떻게 되나요?


답변 부탁 드립니다.




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

예스스탁 예스스탁 답변

2026-01-22 14:28:58

안녕하세요 예스스탁입니다. 올리신 내용은 특정일 특정시간 이후에 신호를 발생하는데 손절매가 발생하면 그이후에는 신호를 발생하지 않겠다는 내용입니다. 날짜와 시간을 지정하지 않고 손절매시 거래 중지로 하시려면 이전 답변과 같이 당일기준으로 변경하시면 됩니다. input : 이평1(60),이평2(60),이평3(240); input : 윌리엄스R기간값(12); input : 손절틱수(350),트레일링스탑틱수(100),목표틱수(300),청산틱수(300); var : mav1(0),mav2(0),mav3(0),WR(0); if Bdate != Bdate[1] Then { Condition1 = true; } MAV1 = MA(c,이평1); MAV2 = MA(c,이평2); MAV3 = MA(c,이평3); WR = WILLR(윌리엄스R기간값); if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then Condition1 = False; if Condition1 == true Then { if MarketPosition == 0 and c < mav3 and CrossDown(WR, -20) Then Sell("s"); if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*청산틱수 Then if CrossUp(C,mav2) Then ExitShort("sx"); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수); } SetStopLoss(PriceScale*손절틱수,PointStop); } 즐거운 하루되세요
프로필 이미지

블루3

2026-01-23 03:22:49

당일 기준(bdate)으로 하면은 시스템을 점심 이후에 시작할 경우 이전 신호가 있어서 청산이 되지 않았을 경우, 진입이 되지 않았던거 같은데,

이 부분은 어떠한가요?
프로필 이미지

블루3

2026-01-23 05:22:08

위의 수식에서 MarketPosition == 0 이 수식이 꼭 들어가야 되나요?
프로필 이미지

예스스탁 예스스탁 답변

2026-01-23 10:34:21

안녕하세요 예스스탁입니다. 올려주신 내용이면 기존과 같이 날짜와 시간을 지정해서 식을 적용하시는 방법뿐이 없습니다. 지정일 지정시간 이후에 신호가 발생하고 손절매가 발생하면 더이상 진입하지 않게 수정해 드립니다. MarketPosition == 0 조건은 해당식에서 있어도 되고 없어도 관계는 없습니다. input : 시작일(20250701),시작시간(090000); input : 이평1(60),이평2(60),이평3(240); input : 윌리엄스R기간값(12); input : 손절틱수(350),트레일링스탑틱수(100),목표틱수(300),청산틱수(300); var : mav1(0),mav2(0),mav3(0),WR(0); if sdate >= 시작일 and sTime >= 시작시간 Then { Condition1 = true; } MAV1 = MA(c,이평1); MAV2 = MA(c,이평2); MAV3 = MA(c,이평3); WR = WILLR(윌리엄스R기간값); if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then Condition1 = False; if Condition1 == true Then { if MarketPosition == 0 and c < mav3 and CrossDown(WR, -20) Then Sell("s"); if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*청산틱수 Then if CrossUp(C,mav2) Then ExitShort("sx"); } if MarketPosition == -1 Then { if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수); } SetStopLoss(PriceScale*손절틱수,PointStop); } 즐거운 하루되세요