예스스탁
예스스탁 답변
2021-03-11 16:17:46
안녕하세요
예스스탁입니다.
NetProfit때문에 손익이 잘못리턴되고 있었습니다.
NetProfit을 변수처리한 뒤에 한봉전값을 저장해 사용하도록 변경했습니다.
진입시점은 저희차트에 MACD지표 적용해서 비교해 보시기 바랍니다.
회사마다 데이타의 차이가 있을 수 있어 지표값이 다를수 있습니다.
아래 내용으로 신호가 차이가 많이 다르시면 02-3453-1060으로 전화주시기 바랍니다.
input : Exit_PT(200),Exit_LPT(200),BuyProfit(150),SellProfit(150),StopTick(100);
var : SP(0),V0(0),V1(0),cond44(False);
input : TradingStartTime1(090000),TradingEndTime1(045400);
var : Today_P( 0 ), Pre_NetProfit( 0 ), ProfitPoint( 0 ),LossPoint(0), myOpenProfit(0),TickPoint(0),NP(0);
input : FastPeriod(92), SlowPeriod(109), SignalPeriod(85);
SP = MarketPosition;
NP = NetProfit;
TickPoint = PriceScale;
V0 = MACD(FastPeriod, SlowPeriod);
V1 = Ema(V0, SignalPeriod);
if sTime == 090000 Or (sTime >= 090000 And (sTime[1] < 090000 Or bDate<>bdate[1])) Then
Begin
ProfitPoint = 0;
Today_P = 0;
Pre_NetProfit = NP[1];
condition99 = false;
condition88 = false;
End;
Today_P = NetProfit - Pre_NetProfit; // 하루 누적 수익
myOpenProfit = OpenPositionProfit;
If (Today_P + myOpenProfit) >= (Exit_PT * TickPoint ) Then
condition99 = true;
If (Today_P + myOpenProfit) <= (-Exit_LPT * TickPoint) Then
condition88 = true;
if TradingStartTime1 < TradingEndTime1 Then
Begin
If TradingStartTIME1 <= sTIME And sTIME <= TradingEndTIME1 Then
COND44 = True;
Else
COND44 = False;
End
Else
Begin
If TradingStartTIME1 <= sTIME Or sTIME <= TradingEndTIME1 Then
COND44 = True;
Else
COND44 = False;
End;
If Cond44 == False Then
Begin
if SP <> 0 Then
Begin
ExitLong("마감 매수 청산");
ExitShort("마감 매도 청산");
End;
Cond44 = False;
End;
ProfitPoint = Exit_PT * TickPoint - Today_P - myOpenProfit;
LossPoint = Exit_LPT * TickPoint + Today_P + myOpenProfit;
if 1 == Sp then
Begin
ExitLong("매수 익절마감", Atlimit, close + ProfitPoint);
ExitLong("매수 손절마감", AtStop, close - LossPoint);
ExitLong("매수 청산", Atlimit, EntryPrice + BuyProfit * TickPoint );
End
Else if -1 == Sp then
Begin
ExitShort("매도 익절마감", Atlimit, close - ProfitPoint);
ExitShort("매도 손절마감", AtStop, close + LossPoint);
ExitShort("매도 청산", Atlimit, EntryPrice - SellProfit * TickPoint );
End;
//지정한 시간대에만 거래
if Cond44 And false == condition99 And false == condition88 Then
Begin
if CrossUp(V0,V1) Then
Buy("매수");
Else if CrossDown(V0,V1) Then
Sell("매도");
End;
SetStopLoss(StopTick * TickPoint,pointstop);
input : up_price1(135), dn_price1(100), up_price2(100), dn_price2(80),up_price3(50), dn_price3(1);
var : TickSize(0);
TickSize = PriceScale;
If MaxPositionProfit < TickSize * (up_price1 + 10) Then
{
SetStopTrailing(TickSize * dn_price1, TickSize * up_price1,PointStop);
}
Else if MaxPositionProfit < TickSize * (up_price2 + 10) Then
{
setstopTrailing(TickSize * dn_price2, TickSize * up_price2,PointStop);
}
Else
{
SetStopTrailing(TickSize * dn_price3, TickSize * up_price3,PointStop);
}
즐거운 하루되세요
> jyck 님이 쓴 글입니다.
> 제목 : 다시 문의 드려요~
> 원글번호 : 71402
안녕하세요?
시그널메이커 옮기는 작업진행중인데요.
그림으로 어떤 문제가 있는지 정리해보았습니다.
가장 중요한 문제는 매매를 거르는 날이 많습니다.
그리고 혹시 예스스탁에서 시스템전략 세팅할때
주의할점이 있다면 알려주세요
이해가 되셨으면 좋겠습니다.
원인좀 꼭 해결 부탁드립니다.
즐거운 하루 되세요~