안녕하세요?
아래 수식에서 교차매매가 되지않게, 현재포지션 청산이되면 다음신호에 진입할수있게 수정부탁드립니다.
감사합니다.
input : 현재양봉틱수(5),전봉양봉틱수(5),현재음봉틱수(5),전봉음봉틱수(5);
input : 익절틱수(50),손절틱수(50);
if O == C[1] and
C == O+현재양봉틱수*PriceScale and
C[1] == O[1]+전봉양봉틱수*PriceScale Then
buy();
if O == C[1] and
C == O-현재음봉틱수*PriceScale and
C[1] == O[1]-전봉음봉틱수*PriceScale Then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2019-11-28 13:34:23
안녕하세요
예스스탁입니다.
input : 현재양봉틱수(5),전봉양봉틱수(5),현재음봉틱수(5),전봉음봉틱수(5);
input : 익절틱수(50),손절틱수(50);
if MarketPosition == 0 and
O == C[1] and
C == O+현재양봉틱수*PriceScale and
C[1] == O[1]+전봉양봉틱수*PriceScale Then
buy();
if MarketPosition == 0 and
O == C[1] and
C == O-현재음봉틱수*PriceScale and
C[1] == O[1]-전봉음봉틱수*PriceScale Then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정부탁드립니다.
> 안녕하세요?
아래 수식에서 교차매매가 되지않게, 현재포지션 청산이되면 다음신호에 진입할수있게 수정부탁드립니다.
감사합니다.
input : 현재양봉틱수(5),전봉양봉틱수(5),현재음봉틱수(5),전봉음봉틱수(5);
input : 익절틱수(50),손절틱수(50);
if O == C[1] and
C == O+현재양봉틱수*PriceScale and
C[1] == O[1]+전봉양봉틱수*PriceScale Then
buy();
if O == C[1] and
C == O-현재음봉틱수*PriceScale and
C[1] == O[1]-전봉음봉틱수*PriceScale Then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);