안녕하세요?
69446에 대한 답변 감사히 잘 받았습니다.
현재 교차매매가 되고있는데, 이부분을 익절손절에 청산하고 다음신호발생시 들어가도록 하고싶습니다.
수정 부탁드립니다.
감사합니다.
1
input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
var1 = ma(C,P1);
var2 = ma(C,P2);
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if entry < n Then
{
if C == O+양봉틱수*PriceScale and var1 < Var2 then
Buy();
if C == O-음봉틱수*PriceScale and var1 > Var2 then
Sell();
}
input : 익절틱수(50),손절틱수(50);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
var1 = ma(C,P1);
var2 = ma(C,P2);
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if entry < n Then
{
if C == O+양봉틱수*PriceScale and var1 > Var2 then
Buy();
if C == O-음봉틱수*PriceScale and var1 < Var2 then
Sell();
}
input : 익절틱수(50),손절틱수(50);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2020-10-13 09:41:48
안녕하세요
예스스탁입니다.
각 진입식에 MarketPosition == 0 조건 추가하시면 됩니다.
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정 부탁드립니다.
> 안녕하세요?
69446에 대한 답변 감사히 잘 받았습니다.
현재 교차매매가 되고있는데, 이부분을 익절손절에 청산하고 다음신호발생시 들어가도록 하고싶습니다.
수정 부탁드립니다.
감사합니다.
1
input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
var1 = ma(C,P1);
var2 = ma(C,P2);
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if entry < n Then
{
if C == O+양봉틱수*PriceScale and var1 < Var2 then
Buy();
if C == O-음봉틱수*PriceScale and var1 > Var2 then
Sell();
}
input : 익절틱수(50),손절틱수(50);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : P1(5),P2(20),n(3),양봉틱수(3),음봉틱수(3);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
var1 = ma(C,P1);
var2 = ma(C,P2);
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if entry < n Then
{
if C == O+양봉틱수*PriceScale and var1 > Var2 then
Buy();
if C == O-음봉틱수*PriceScale and var1 < Var2 then
Sell();
}
input : 익절틱수(50),손절틱수(50);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);