안녕하세요?
아래수식에서 2가지 추가를 하고싶습니다.
감사합니다.
1) 현재 포지션 보유 상태에서, 신호발생시 매매가 이루어집니다.
---> "포지션보유시, 익절손절 되기전에 재진입 금지" 로 수정부탁드립니다.
2) 하루매매횟수(외부변수)
input : 익절틱수(50),손절틱수(50);
Input : shortPeriod(5), longPeriod(20);
value1 = ema(C, shortPeriod);
value2 = ema(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2020-08-31 17:56:53
안녕하세요
예스스탁입니다.
input : 익절틱수(50),손절틱수(50),entrycnt(3);
Input : shortPeriod(5), longPeriod(20);
var : 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;
value1 = ema(C, shortPeriod);
value2 = ema(C, longPeriod);
If MarketPosition == 0 and entry < entrycnt and CrossUP(value1, value2) Then
{
Buy();
}
If MarketPosition == 0 and entry < entrycnt and CrossDown(value1, value2) Then
{
Sell();
}
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식 부탁드립니다.
> 안녕하세요?
아래수식에서 2가지 추가를 하고싶습니다.
감사합니다.
1) 현재 포지션 보유 상태에서, 신호발생시 매매가 이루어집니다.
---> "포지션보유시, 익절손절 되기전에 재진입 금지" 로 수정부탁드립니다.
2) 하루매매횟수(외부변수)
input : 익절틱수(50),손절틱수(50);
Input : shortPeriod(5), longPeriod(20);
value1 = ema(C, shortPeriod);
value2 = ema(C, longPeriod);
# 매수/매도청산
If CrossUP(value1, value2) Then
{
Buy();
}
# 매도/매수청산
If CrossDown(value1, value2) Then
{
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);