예스스탁
예스스탁 답변
2023-07-03 18:15:49
안녕하세요
예스스탁입니다.
1
Input : maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), sPeriod(12), lPeriod(26);
input : 진입횟수(3);
input : 익절틱수(50),손절틱수(50);
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(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), sPeriod);
value2 = ema(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), lperiod);
# 매수/매도청산
if CrossUp(value1-value2,0) Then
{
if entry < 진입횟수 Then
Buy();
Else
ExitShort();
}
# 매도/매수청산
if CrossDown(value1-value2,0) Then
{
if entry < 진입횟수 Then
Sell();
Else
ExitLong();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 진입횟수(3);
input : 익절틱수(50),손절틱수(50);
Inputs: ConsecutiveOBV(3), Length(15), Pval(0.05);
Variables: OBVcalc(0);
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;
OBVcalc = OBV() * 0.0001;
If CountIF(OBVcalc > Highest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
{
if entry < 진입횟수 Then
Buy();
Else
ExitShort();
}
If CountIF(OBVcalc < Lowest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
{
if entry < 진입횟수 Then
Sell();
Else
ExitLong();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
3
entrycnt(3),profit(50),loss(50);
기존식에 이미지정되어 있습니다.
한글변수로 변경해 드립니다.
input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20);
input : 진입횟수(3),익절틱수(50),손절틱수(50);
var : entry(0);
var1 = ma(c,p1);
var2 = ma(c,p2);
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;
if entry < 진입횟수 and var1 > Var2 and MarketPosition == 0 and C >= O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then
buy();
if entry < 진입횟수 and var1 < Var2 and MarketPosition == 0 and C <= O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식 추가 부탁드려요
> 안녕하세요? 아래 수식 세가지에 추가 부탁드립니다.
[1] 손절,익절 외부변수 추가 부탁드려요
Input : maPeriod(20), ROCPeriod(12), stoPeriod1(5), stoPeriod2(3), sPeriod(12), lPeriod(26);
input : 진입횟수(3);
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(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), sPeriod);
value2 = ema(BW(maPeriod,ROCPeriod,stoPeriod1,stoPeriod2), lperiod);
# 매수/매도청산
if CrossUp(value1-value2,0) Then
{
if entry < 진입횟수 Then
Buy();
Else
ExitShort();
}
# 매도/매수청산
if CrossDown(value1-value2,0) Then
{
if entry < 진입횟수 Then
Sell();
Else
ExitLong();
}
------------------------------------------------------------------------------------
[2] 진입횟수, 손절, 익절 외부변수 추가 부타드려요
OBV New high_Low
Inputs: ConsecutiveOBV(3), Length(15), Pval(0.05);
Variables: OBVcalc(0);
OBVcalc = OBV() * 0.0001;
If CountIF(OBVcalc > Highest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
Buy ("OBV_LE", AtStop, Close + Pval);
If CountIF(OBVcalc < Lowest(OBVcalc, Length)[1], ConsecutiveOBV) == ConsecutiveOBV Then
Sell ("OBV_SE", AtStop, Close - Pval);
------------------------------------------------------------------------------------
[3] 진입횟수, 손절, 익절 외부변수 추가 부타드려요
input : 양봉(5),진입음봉(5),음봉(5),진입양봉(5),p1(5),p2(20);
input : entrycnt(3),profit(50),loss(50);
var : entry(0);
var1 = ma(c,p1);
var2 = ma(c,p2);
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;
if entry < entrycnt and var1 > Var2 and MarketPosition == 0 and C >= O+진입양봉*PriceScale and C[1] == O[1]-음봉*PriceScale then
buy();
if entry < entrycnt and var1 < Var2 and MarketPosition == 0 and C <= O-진입양봉*PriceScale and C[1] == O[1]+양봉*PriceScale then
sell();
SetStopProfittarget(PriceScale*profit,PointStop);
SetStopLoss(PriceScale*loss,PointStop);