안녕하세요?
답변 감사히 잘 받았고, 제가 추가로 고치고싶은 부분이 있는데 잘안되서 문의드립니다.
역으로 재진입을 하게되있는데, 반복해서 하지말고 한번 재진입익절/손절 까지 그대로 가는걸로 하고싶습니다.
감사합니다.
input : 전봉음봉(5),진입음봉(5);
input : 전봉양봉(5),진입양봉(5);
input : p1(5),p2(20);
input : entrycnt(3),profit(50),loss(50);
var1 = ma(c,p1);
var2 = ma(c,p2);
if var1 > Var2 and C <= O-진입음봉*PriceScale and C[1] == O[1]-전봉음봉*PriceScale then
sell("s");
if var1 < Var2 and C >= O+진입양봉*PriceScale and C[1] == O[1]+전봉양봉*PriceScale then
buy("b");
if MarketPosition == -1 and BarsSinceEntry <= 3 and C > O Then
Buy("sb");
if MarketPosition == 1 and BarsSinceEntry <= 3 and C < O Then
Sell("bs");
SetStopProfittarget(PriceScale*profit,PointStop);
SetStopLoss(PriceScale*loss,PointStop);
답변 1
예스스탁
예스스탁 답변
2020-11-23 10:49:42
안녕하세요
예스스탁입니다.
input : 전봉음봉(5),진입음봉(5);
input : 전봉양봉(5),진입양봉(5);
input : p1(5),p2(20);
input : entrycnt(3),profit(50),loss(50);
var1 = ma(c,p1);
var2 = ma(c,p2);
if MarketPosition == 0 and var1 > Var2 and C <= O-진입음봉*PriceScale and C[1] == O[1]-전봉음봉*PriceScale then
sell("s");
if MarketPosition == 0 and var1 < Var2 and C >= O+진입양봉*PriceScale and C[1] == O[1]+전봉양봉*PriceScale then
buy("b");
if MarketPosition == -1 and BarsSinceEntry <= 3 and C > O Then
Buy("sb");
if MarketPosition == 1 and BarsSinceEntry <= 3 and C < O Then
Sell("bs");
SetStopProfittarget(PriceScale*profit,PointStop);
SetStopLoss(PriceScale*loss,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정 부탁드립니다.
> 안녕하세요?
답변 감사히 잘 받았고, 제가 추가로 고치고싶은 부분이 있는데 잘안되서 문의드립니다.
역으로 재진입을 하게되있는데, 반복해서 하지말고 한번 재진입익절/손절 까지 그대로 가는걸로 하고싶습니다.
감사합니다.
input : 전봉음봉(5),진입음봉(5);
input : 전봉양봉(5),진입양봉(5);
input : p1(5),p2(20);
input : entrycnt(3),profit(50),loss(50);
var1 = ma(c,p1);
var2 = ma(c,p2);
if var1 > Var2 and C <= O-진입음봉*PriceScale and C[1] == O[1]-전봉음봉*PriceScale then
sell("s");
if var1 < Var2 and C >= O+진입양봉*PriceScale and C[1] == O[1]+전봉양봉*PriceScale then
buy("b");
if MarketPosition == -1 and BarsSinceEntry <= 3 and C > O Then
Buy("sb");
if MarketPosition == 1 and BarsSinceEntry <= 3 and C < O Then
Sell("bs");
SetStopProfittarget(PriceScale*profit,PointStop);
SetStopLoss(PriceScale*loss,PointStop);