안녕하세요. 수식을 만들어 보는데 어려워서 도움을 요청드립니다.
개념은
1)5선,20선이 크로스업 이후 5선아래 음봉에서 매수를 ,
크로스 다운은 5선위 양봉에서 매도를 하고 싶습니다.(1계약기준)
3)이익은 1Pt로 손실은 0.5Pt로 하고 싶습니다.
INPUT : ,sPeriod(5), mPeriod(20);
Value1 = ma(C, sPeriod);
Value2 = ma(C, mPeriod);
#매수조건
If (Value1 > Value2) and CrossDown(C,Value1) Then
Buy( );
#매도조건
If (Value1 < Value2) and CrossUp(C,Value1) Then
Sell( );
답변 1
예스스탁
예스스탁 답변
2020-03-11 09:49:07
안녕하세요
예스스탁입니다.
INPUT : ,sPeriod(5), mPeriod(20);
var : T(0);
Value1 = ma(C, sPeriod);
Value2 = ma(C, mPeriod);
if crossup(value1,value2) Then
T = 1;
if CrossDown(value1,value2) Then
T = -1;
if T == 1 and C < value1 and C < O Then
{
T = 2;
buy("b");
}
if T == -1 and C > value1 and C > O Then
{
T = 2;
sell("s");
}
SetStopProfittarget(1,PointStop);
SetStopLoss(0.5,PointStop);
즐거운 하루되세요
> 페파 님이 쓴 글입니다.
> 제목 : 수익과 손절식을 넣고 싶습니다.
> 안녕하세요. 수식을 만들어 보는데 어려워서 도움을 요청드립니다.
개념은
1)5선,20선이 크로스업 이후 5선아래 음봉에서 매수를 ,
크로스 다운은 5선위 양봉에서 매도를 하고 싶습니다.(1계약기준)
3)이익은 1Pt로 손실은 0.5Pt로 하고 싶습니다.
INPUT : ,sPeriod(5), mPeriod(20);
Value1 = ma(C, sPeriod);
Value2 = ma(C, mPeriod);
#매수조건
If (Value1 > Value2) and CrossDown(C,Value1) Then
Buy( );
#매도조건
If (Value1 < Value2) and CrossUp(C,Value1) Then
Sell( );