예스스탁
예스스탁 답변
2020-01-14 09:39:43
안녕하세요
예스스탁입니다.
1
input : P1(5),P2(20),진입횟수(3);
input : 매수음봉길이틱수(2),매수양봉길이틱수(2);
input : 매도양봉길이틱수(2),매도음봉길이틱수(2);
input : 익절틱수(50),손절틱수(50);
var : entry(0);
if bdate != bdate[1] Then
{
entry = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
var1 = ma(C,P1);
var2 = ma(C,P2);
if MarketPosition == 0 and
entry < 진입횟수 and
countif(var1<var2,2) == 2 and
C[1] == O[1]-매수음봉길이틱수*PriceScale and
C[0] == O[0]+매수양봉길이틱수*PriceScale and
C[0] == O[1] Then
buy();
if MarketPosition == 0 and
entry < 진입횟수 and
countif(var1>var2,2) == 2 and
C[1] == O[1]+매도양봉길이틱수*PriceScale and
C[0] == O[0]-매도음봉길이틱수*PriceScale and
O[0] == C[1] Then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : P1(5),P2(20),진입횟수(3);
input : 매수양봉길이틱수(2);
input : 매도음봉길이틱수(2);
input : 익절틱수(50),손절틱수(50);
var : entry(0);
if bdate != bdate[1] Then
{
entry = 0;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
var1 = ma(C,P1);
var2 = ma(C,P2);
if MarketPosition == 0 and
countif(var1<var2 and C == O+매수양봉길이틱수*PriceScale,3) == 3 and
C[0] == C[1]+PriceScale*1 and
C[1] == C[2]+PriceScale*1 Then
buy();
if MarketPosition == 0 and
countif(var1>var2 and C == O-매도음봉길이틱수*PriceScale,3) == 3 and
C[0] == C[1]-PriceScale*1 and
C[1] == C[2]-PriceScale*1 Then
sell();
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식추가 부탁드립니다.
> 안녕하세요?
아래의 2가지 시스템 모두 하루매매횟수를 외부변수로 할수있게 부탁드립니다.
감사합니다.
1
input : P1(5),P2(20);
input : 매수음봉길이틱수(2),매수양봉길이틱수(2);
input : 매도양봉길이틱수(2),매도음봉길이틱수(2);
input : 익절틱수(50),손절틱수(50);
var1 = ma(C,P1);
var2 = ma(C,P2);
if MarketPosition == 0 and
countif(var1<var2,2) == 2 and
C[1] == O[1]-매수음봉길이틱수*PriceScale and
C[0] == O[0]+매수양봉길이틱수*PriceScale and
C[0] == O[1] Then
buy();
if MarketPosition == 0 and
countif(var1>var2,2) == 2 and
C[1] == O[1]+매도양봉길이틱수*PriceScale and
C[0] == O[0]-매도음봉길이틱수*PriceScale and
O[0] == C[1] Then
sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : P1(5),P2(20);
input : 매수양봉길이틱수(2);
input : 매도음봉길이틱수(2);
input : 익절틱수(50),손절틱수(50);
var1 = ma(C,P1);
var2 = ma(C,P2);
if MarketPosition == 0 and
countif(var1<var2 and C == O+매수양봉길이틱수*PriceScale,3) == 3 and
C[0] == C[1]+PriceScale*1 and
C[1] == C[2]+PriceScale*1 Then
buy();
if MarketPosition == 0 and
countif(var1>var2 and C == O-매도음봉길이틱수*PriceScale,3) == 3 and
C[0] == C[1]-PriceScale*1 and
C[1] == C[2]-PriceScale*1 Then
sell();