커뮤니티

문의

프로필 이미지
좌오비우오비
2020-10-28 12:10:10
860
글번호 143459
답변완료

첨부 이미지

아래 수식에 오류발생합니다. 첨부파일 참조(내부함수의 입력값이 2개부터 4개까지 가능합니다) SetStopTrailing(0); ----> SetStopTrailing(0,0); 이렇게 하면 되는 건지요? 그리고, 답변주실 때 청산변수에 따라 결과가 변하는지 test 해주시면 고맙겠습니다. 항상 고맙습니다. ************************************************************************************** input:봉(9),신저가(6); input : ex시간1(90000),ex시간2(115900),하이(3.00),로우(2.00); input : sellLOSS(1.30),sellLimit(99999),sell트레일링(99999),sell최소수익(0.00),sellTRAIL(3.60),sell최소가격변화포인트(99999),sell봉갯수(99999); if bDate[봉] == Bdate and CountIf(Bdate == Bdate[1] and L < DayLow(0)[1],봉) >= 신저가 Then Sell(); if MarketPosition == -1 and IsEntryName("s") == true and EntryTime(0) >= ex시간1 and EntryTime(0) < ex시간2 and (H[BarsSinceEntry]-L[BarsSinceEntry]) >= 로우 and (H[BarsSinceEntry]-L[BarsSinceEntry]) <= 하이 Then { SetStopLoss(sellLOSS,PointStop); SetStopProfittarget(sellLimit,PointStop); ExitShort("s트레일링",AtStop,Lowest(l,BarsSinceEntry)+sell트레일링); SetStopTrailing(sellTRAIL,sell최소수익,PointStop); SetStopInactivity(sell최소가격변화포인트,sell봉갯수,PointStop); } Else { SetStopLoss(0); SetStopProfittarget(0); SetStopTrailing(0); SetStopInactivity(0,0); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-10-28 13:26:14

안녕하세요 예스스탁입니다. 1 SetStopTrailing에 0을 하나더 추가해 주시기 바랍니다. SetStopTrailing(0,0); 2 청산식에 진입명이 "s"라는 조건이 있습니다.(IsEntryName("s") == true) 하지만 작성하신 식에 sell함수에는 이름이 없습니다. sell("s");로 이름을 지정하서야 합니다. 아래는 수정한 식입니다. input:봉(9),신저가(6); input : ex시간1(90000),ex시간2(115900),하이(3.00),로우(2.00); input : sellLOSS(1.30),sellLimit(99999),sell트레일링(99999),sell최소수익(0.00),sellTRAIL(3.60),sell최소가격변화포인트(99999),sell봉갯수(99999); if bDate[봉] == Bdate and CountIf(Bdate == Bdate[1] and L < DayLow(0)[1],봉) >= 신저가 Then Sell("s"); if MarketPosition == -1 and IsEntryName("s") == true and EntryTime(0) >= ex시간1 and EntryTime(0) < ex시간2 and (H[BarsSinceEntry]-L[BarsSinceEntry]) >= 로우 and (H[BarsSinceEntry]-L[BarsSinceEntry]) <= 하이 Then { SetStopLoss(sellLOSS,PointStop); SetStopProfittarget(sellLimit,PointStop); ExitShort("s트레일링",AtStop,Lowest(l,BarsSinceEntry)+sell트레일링); SetStopTrailing(sellTRAIL,sell최소수익,PointStop); SetStopInactivity(sell최소가격변화포인트,sell봉갯수,PointStop); } Else { SetStopLoss(0); SetStopProfittarget(0); SetStopTrailing(0,0); SetStopInactivity(0,0); } 3 수식에 이상이 없고 외부변수 변경하면 변경된 내용으로 동작합니다. 즐거운 하루되세요 > 좌오비우오비 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식에 오류발생합니다. 첨부파일 참조(내부함수의 입력값이 2개부터 4개까지 가능합니다) SetStopTrailing(0); ----> SetStopTrailing(0,0); 이렇게 하면 되는 건지요? 그리고, 답변주실 때 청산변수에 따라 결과가 변하는지 test 해주시면 고맙겠습니다. 항상 고맙습니다. ************************************************************************************** input:봉(9),신저가(6); input : ex시간1(90000),ex시간2(115900),하이(3.00),로우(2.00); input : sellLOSS(1.30),sellLimit(99999),sell트레일링(99999),sell최소수익(0.00),sellTRAIL(3.60),sell최소가격변화포인트(99999),sell봉갯수(99999); if bDate[봉] == Bdate and CountIf(Bdate == Bdate[1] and L < DayLow(0)[1],봉) >= 신저가 Then Sell(); if MarketPosition == -1 and IsEntryName("s") == true and EntryTime(0) >= ex시간1 and EntryTime(0) < ex시간2 and (H[BarsSinceEntry]-L[BarsSinceEntry]) >= 로우 and (H[BarsSinceEntry]-L[BarsSinceEntry]) <= 하이 Then { SetStopLoss(sellLOSS,PointStop); SetStopProfittarget(sellLimit,PointStop); ExitShort("s트레일링",AtStop,Lowest(l,BarsSinceEntry)+sell트레일링); SetStopTrailing(sellTRAIL,sell최소수익,PointStop); SetStopInactivity(sell최소가격변화포인트,sell봉갯수,PointStop); } Else { SetStopLoss(0); SetStopProfittarget(0); SetStopTrailing(0); SetStopInactivity(0,0); }