안녕하세요?
최근 답변 감사히 잘받았습니다.
아래는 답변받은 수식인데요, 전일 마지막캔들까지 인식을 해버리거든요.
예를들어 2틱양봉 2틱양봉후에 매수라고 설정을해놓으면, 전일마지막캔들이 2틱양봉으로 끝난경우에 그것까지 인식을해서 당일 첫번째봉에 진입을 하더라구요.
차트에서 금일만 나오게해서 하는방법은 알고있지만, 성능보고서로 체크도힘들고, 현재 그렇게 거래하고있는 시스템은 하나도없어서 많이불편해서그런데, 혹시 수식으로 연결선물로해서 금일것만 인식해서 매매가 이루어지도록 하는방법은 없나요?
도움요청드립니다.
감사합니다.
input : 매수전봉양봉틱수(5),매수현재양봉틱수(5);
input : 매도전봉음봉틱수(5),매도현재음봉틱수(5);
input : 진입횟수(5);
input : 익절틱수(50),손절틱수(50);
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if entry < 진입횟수 and
MarketPosition == 0 and
C[1] == O[1]-매도전봉음봉틱수*PriceScale and
C[0] == O[0]-매도현재음봉틱수*PriceScale Then
sell("s");
if entry < 진입횟수 and
MarketPosition == 0 and
C[1] == O[1]+매수전봉양봉틱수*PriceScale and
C[0] == O[0]+매수현재양봉틱수*PriceScale Then
buy("b");
if MarketPosition == 1 Then
sell("bs",AtStop,EntryPrice-PriceScale*손절틱수);
if MarketPosition == -1 Then
buy("sb",AtStop,EntryPrice+PriceScale*손절틱수);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2020-03-23 10:28:37
안녕하세요
예스스탁입니다.
input : 매수전봉양봉틱수(5),매수현재양봉틱수(5);
input : 매도전봉음봉틱수(5),매도현재음봉틱수(5);
input : 진입횟수(5);
input : 익절틱수(50),손절틱수(50);
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if entry < 진입횟수 and
bdate == bdate[1] and
MarketPosition == 0 and
C[1] == O[1]-매도전봉음봉틱수*PriceScale and
C[0] == O[0]-매도현재음봉틱수*PriceScale Then
sell("s");
if entry < 진입횟수 and
bdate == bdate[1] and
MarketPosition == 0 and
C[1] == O[1]+매수전봉양봉틱수*PriceScale and
C[0] == O[0]+매수현재양봉틱수*PriceScale Then
buy("b");
if MarketPosition == 1 Then
sell("bs",AtStop,EntryPrice-PriceScale*손절틱수);
if MarketPosition == -1 Then
buy("sb",AtStop,EntryPrice+PriceScale*손절틱수);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 도움요청드립니다.
> 안녕하세요?
최근 답변 감사히 잘받았습니다.
아래는 답변받은 수식인데요, 전일 마지막캔들까지 인식을 해버리거든요.
예를들어 2틱양봉 2틱양봉후에 매수라고 설정을해놓으면, 전일마지막캔들이 2틱양봉으로 끝난경우에 그것까지 인식을해서 당일 첫번째봉에 진입을 하더라구요.
차트에서 금일만 나오게해서 하는방법은 알고있지만, 성능보고서로 체크도힘들고, 현재 그렇게 거래하고있는 시스템은 하나도없어서 많이불편해서그런데, 혹시 수식으로 연결선물로해서 금일것만 인식해서 매매가 이루어지도록 하는방법은 없나요?
도움요청드립니다.
감사합니다.
input : 매수전봉양봉틱수(5),매수현재양봉틱수(5);
input : 매도전봉음봉틱수(5),매도현재음봉틱수(5);
input : 진입횟수(5);
input : 익절틱수(50),손절틱수(50);
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
if entry < 진입횟수 and
MarketPosition == 0 and
C[1] == O[1]-매도전봉음봉틱수*PriceScale and
C[0] == O[0]-매도현재음봉틱수*PriceScale Then
sell("s");
if entry < 진입횟수 and
MarketPosition == 0 and
C[1] == O[1]+매수전봉양봉틱수*PriceScale and
C[0] == O[0]+매수현재양봉틱수*PriceScale Then
buy("b");
if MarketPosition == 1 Then
sell("bs",AtStop,EntryPrice-PriceScale*손절틱수);
if MarketPosition == -1 Then
buy("sb",AtStop,EntryPrice+PriceScale*손절틱수);
SetStopProfittarget(PriceScale*익절틱수,PointStop);