안녕하세요?
아래의 수식 수정부탁드립니다.
현재 매수기준선 매도기준선 이부분은 외부변수로 지정된곳만 기준선이 적용되고있습니다.
이것을 뒷자리만 바꾸면 1포인트단위로 모든부분이 기준선이 되었으면합니다.
예로, .05로 바꾸면 401.05 / 402.05 / 403.05 / 404.05 .......이런식으로
1번과 2번 시스템 모두 수정부탁드립니다.
감사합니다.
1
input : 매수기준선(410),매도기준선(400),양봉(5),음봉(5);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
var1 = (C+O)/2;
if entry < 진입횟수 Then
{
if C == O+양봉*PriceScale and CrossUp(var1,매수기준선) Then
Buy();
if C == O-음봉*PriceScale and CrossDown(var1,매도기준선) Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 매수기준선(410),매도기준선(400);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
if entry < 진입횟수 Then
{
if C == 매수기준선 and C > O Then
Buy();
if C == 매도기준선 and C < O Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2021-09-24 12:39:41
안녕하세요
예스스탁입니다.
1
input : 매수기준선(0.05),매도기준선(0.05),양봉(5),음봉(5);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
var1 = (C+O)/2;
value1 = Floor(C[1])+매수기준선;
value2 = Floor(C[1]+1)+매수기준선;
value3 = Floor(C[1])+매도기준선;
value4 = Floor(C[1]-1)+매도기준선;
if entry < 진입횟수 Then
{
if C == O+양봉*PriceScale and
((var1[1] < value1 and var1 >= value1) or (var1[1] > value1 and var1 >= Value2)) Then
Buy();
if C == O-음봉*PriceScale and
((var1[1] > Value3 and var1 <= Value3) or (var1[1] < Value3 and var1 <= Value4)) Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 매수기준선(0.05),매도기준선(0.05);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
var1 = (C+O)/2;
value1 = Floor(C[1])+매수기준선;
value2 = Floor(C[1]+1)+매수기준선;
value3 = Floor(C[1])+매도기준선;
value4 = Floor(C[1]-1)+매도기준선;
if entry < 진입횟수 Then
{
if C > O and
((C[1] < value1 and C == value1) or (C[1] > value1 and C == Value2)) Then
Buy();
if C < O and
((C[1] > Value3 and C == Value3) or (C[1] < Value3 and C == Value4)) Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수정 부탁드립니다.
> 안녕하세요?
아래의 수식 수정부탁드립니다.
현재 매수기준선 매도기준선 이부분은 외부변수로 지정된곳만 기준선이 적용되고있습니다.
이것을 뒷자리만 바꾸면 1포인트단위로 모든부분이 기준선이 되었으면합니다.
예로, .05로 바꾸면 401.05 / 402.05 / 403.05 / 404.05 .......이런식으로
1번과 2번 시스템 모두 수정부탁드립니다.
감사합니다.
1
input : 매수기준선(410),매도기준선(400),양봉(5),음봉(5);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
var1 = (C+O)/2;
if entry < 진입횟수 Then
{
if C == O+양봉*PriceScale and CrossUp(var1,매수기준선) Then
Buy();
if C == O-음봉*PriceScale and CrossDown(var1,매도기준선) Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 매수기준선(410),매도기준선(400);
input : 익절틱수(50),손절틱수(50),진입횟수(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;
if entry < 진입횟수 Then
{
if C == 매수기준선 and C > O Then
Buy();
if C == 매도기준선 and C < O Then
Sell();
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);