안녕하세요?
아래의 수식에서 이동평균선을 추가하고싶습니다.
1) 이동평균선 2개
2) 정배열에서 매도, 역배열에서 매수
부탁드립니다.
감사합니다.
input : 익절틱수(50),손절틱수(50),n(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 MarketPosition == 0 and
entry < n and
C[2] > O[2] and
C[1] < O[1] and
C > O Then
Buy();
if MarketPosition == 0 and
entry < n and
C[2] < O[2] and
C[1] > O[1] and
C < O Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
답변 1
예스스탁
예스스탁 답변
2020-12-21 15:43:28
안녕하세요
예스스탁입니다.
input : 익절틱수(50),손절틱수(50),n(3);
input : P1(5),P2(20);
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 MarketPosition == 0 and
var1 < Var2 and
entry < n and
C[2] > O[2] and
C[1] < O[1] and
C > O Then
Buy();
if MarketPosition == 0 and
var1 < Var2 and
entry < n and
C[2] < O[2] and
C[1] > O[1] and
C < O Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식 추가 부탁드립니다.
> 안녕하세요?
아래의 수식에서 이동평균선을 추가하고싶습니다.
1) 이동평균선 2개
2) 정배열에서 매도, 역배열에서 매수
부탁드립니다.
감사합니다.
input : 익절틱수(50),손절틱수(50),n(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 MarketPosition == 0 and
entry < n and
C[2] > O[2] and
C[1] < O[1] and
C > O Then
Buy();
if MarketPosition == 0 and
entry < n and
C[2] < O[2] and
C[1] > O[1] and
C < O Then
Sell();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);