안녕하세요?
아래의 수식에서 하루진입횟수에 1을넣으면 2회가되고, 2를넣으면 4회가되고 3을넣으면 6회가 됩니다. 문제점을 못찾겠습니다. 수정부탁드립니다.
input : 윗꼬리(5),아랫꼬리(5);
input : 익절틱수(50),손절틱수(50),진입횟수(3);
var : dnTail(0),uptail(0),entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
dnTail = min(C,O)-L;
upTail = H-max(C,O);
if MarketPosition == 0 and dntail >= 아랫꼬리*PriceScale and entry < 진입횟수 Then
Buy();
if MarketPosition == 0 and uptail >= 윗꼬리*PriceScale and entry < 진입횟수 Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2021-03-23 09:13:08
안녕하세요
예스스탁입니다.
해당 내용은 한봉에 매수진입과 매도진입이 동시충족되기 때문입니다.
해당 부분은 매수와 매도진입이 동시만족할 때
진입중 수식기술상 먼저작성된 매수진입만 진입하게 하는 방법뿐이 없습니다.
만약 동시만족시 매도진입이 들어가길 원하시면
매도진입내용을 매수보다 위쪽으로 옮기시면 됩니다.
input : 윗꼬리(5),아랫꼬리(5);
input : 익절틱수(50),손절틱수(50),진입횟수(3);
var : dnTail(0),uptail(0),entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
dnTail = min(C,O)-L;
upTail = H-max(C,O);
Condition1 = False;
if Condition1 == False and MarketPosition == 0 and dntail >= 아랫꼬리*PriceScale and entry < 진입횟수 Then
{
Condition1 = true;
Buy();
}
if Condition1 == False and MarketPosition == 0 and uptail >= 윗꼬리*PriceScale and entry < 진입횟수 Then
{
Condition1 = true;
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정 부탁드립니다.
>
안녕하세요?
아래의 수식에서 하루진입횟수에 1을넣으면 2회가되고, 2를넣으면 4회가되고 3을넣으면 6회가 됩니다. 문제점을 못찾겠습니다. 수정부탁드립니다.
input : 윗꼬리(5),아랫꼬리(5);
input : 익절틱수(50),손절틱수(50),진입횟수(3);
var : dnTail(0),uptail(0),entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
dnTail = min(C,O)-L;
upTail = H-max(C,O);
if MarketPosition == 0 and dntail >= 아랫꼬리*PriceScale and entry < 진입횟수 Then
Buy();
if MarketPosition == 0 and uptail >= 윗꼬리*PriceScale and entry < 진입횟수 Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);