커뮤니티
질의
input : 시작일(20260101),시작시간(090000);
input : 이평1(180),이평2(15);
input : 윌리엄스R기간값(14);
input : 손절틱수(100),목표틱수(200),트레일링스탑틱수(100);
var : mav1(0),WR(0);
if sdate >= 시작일 and sTime >= 시작시간 Then
{
Condition1 = true;
Condition2 = true;
}
MAV1 = MA(c,이평1);
WR = WILLR(윌리엄스R기간값);
if TotalTrades > TotalTrades and IsExitName("StopLoss",1) ==true Then
Condition2 = False;
if Condition1 == true and Condition2 == true Then
{
if MarketPosition == 0 and c < mav1 and CrossDown(WR, -20) Then
Sell("s");
if MarketPosition == -1 Then
{
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*목표틱수 Then
ExitShort("str",AtStop,EntryPrice-PriceScale*트레일링스탑틱수);
}
SetStopLoss(PriceScale*손절틱수,PointStop);
}
위의 수식은 손절이 되면은 더이상 진입이 안되게 하려고 한것인데요..
실전에서는 아직 확인 안되었지만 시물레이셔나트나 시험적용에서는 손절 후 진입신호가 나오는데,
원래 그런 것인지 아니면 수식이 잘못 된 것인지 알고 싶습니다.
감사합니다..
수고하세요..
답변 1
예스스탁 예스스탁 답변
2026-01-26 13:53:37