안녕하세요.
피라미딩으로 매수한 건에 대해 각각 수익, 손실 청산을 별도로 하는 방법을 알고 싶습니다. B1은 조건 만족때마다 최대 maxEntriesA까지 각각 1개씩 매수, 또 B2는 조건 만족때마다 최대 maxEntriesB까지 각각 1개씩 매수하고, B1으로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitA, lossA를 만족하면 청산이 되고, B2로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitB, lossB를 만족하면 청산이 되도록 하고 싶습니다.
input : maxEntriesA(3),maxEntriesB(3), profitA(30),profitB(20),lossA(10),lossB(10);
.....
if condition1 then buy("B1");
if condition2 then buy("B2");
if marketPosition==1 then {
if isEntryName("B1")==true then {
setStopProfitTarget(profitA,percentStop);
setStopLoss(lossA,percentStop);
}
if isEntryName("B2")==true then {
setStopProfitTarget(profitB,percentStop);
setStopLoss(lossB,percentStop);
}
}
답변 2
예스스탁
예스스탁 답변
2022-06-17 11:16:06
안녕하세요
예스스탁입니다.
문의하신 내용은 가능하지 않습니다.
강제청산함수를 피라미딩시 진입명별로 다르게 동작하게 할수는 없습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 씸풀 님이 쓴 글입니다.
> 제목 : 피라미딩 매수 처리
> 안녕하세요.
피라미딩으로 매수한 건에 대해 각각 수익, 손실 청산을 별도로 하는 방법을 알고 싶습니다. B1은 조건 만족때마다 최대 maxEntriesA까지 각각 1개씩 매수, 또 B2는 조건 만족때마다 최대 maxEntriesB까지 각각 1개씩 매수하고, B1으로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitA, lossA를 만족하면 청산이 되고, B2로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitB, lossB를 만족하면 청산이 되도록 하고 싶습니다.
input : maxEntriesA(3),maxEntriesB(3), profitA(30),profitB(20),lossA(10),lossB(10);
.....
if condition1 then buy("B1");
if condition2 then buy("B2");
if marketPosition==1 then {
if isEntryName("B1")==true then {
setStopProfitTarget(profitA,percentStop);
setStopLoss(lossA,percentStop);
}
if isEntryName("B2")==true then {
setStopProfitTarget(profitB,percentStop);
setStopLoss(lossB,percentStop);
}
}
네, 감사합니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 피라미딩 매수 처리
> 안녕하세요
예스스탁입니다.
문의하신 내용은 가능하지 않습니다.
강제청산함수를 피라미딩시 진입명별로 다르게 동작하게 할수는 없습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 씸풀 님이 쓴 글입니다.
> 제목 : 피라미딩 매수 처리
> 안녕하세요.
피라미딩으로 매수한 건에 대해 각각 수익, 손실 청산을 별도로 하는 방법을 알고 싶습니다. B1은 조건 만족때마다 최대 maxEntriesA까지 각각 1개씩 매수, 또 B2는 조건 만족때마다 최대 maxEntriesB까지 각각 1개씩 매수하고, B1으로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitA, lossA를 만족하면 청산이 되고, B2로 1개 이상 매수가 되면 각각의 진입가에 대해서 profitB, lossB를 만족하면 청산이 되도록 하고 싶습니다.
input : maxEntriesA(3),maxEntriesB(3), profitA(30),profitB(20),lossA(10),lossB(10);
.....
if condition1 then buy("B1");
if condition2 then buy("B2");
if marketPosition==1 then {
if isEntryName("B1")==true then {
setStopProfitTarget(profitA,percentStop);
setStopLoss(lossA,percentStop);
}
if isEntryName("B2")==true then {
setStopProfitTarget(profitB,percentStop);
setStopLoss(lossB,percentStop);
}
}