커뮤니티
문의
2013-03-28 14:58:18
204
글번호 61344
항상 감사드립니다.
답변 1
예스스탁 예스스탁 답변
2013-03-28 13:45:49
안녕하세요
예스스탁입니다.
Inputs: FastLen(5), MedLen(20), SlowLen(70);
Variables: FastAvg(0), MedAvg(0), SlowAvg(0);
if (MarketPosition == 0 and ExitDate(1) == sdate and ExitDate(2) == sdate and PositionProfit(1) < 0 and PositionProfit(2) < 0)
or (MarketPosition == 1 and ExitDate(1) == sdate and PositionProfit(1) < 0 and C < EntryPrice)
or (MarketPosition == 1 and ExitDate(1) == sdate and PositionProfit(1) < 0 and C > EntryPrice) Then
Condition1 = true;
Else
Condition1 = false;
FastAvg = MA(Close, FastLen);
MedAvg = MA(Close, MedLen);
SlowAvg = MA(Close, SlowLen);
If (FastAvg[1] < MedAvg[1] OR MedAvg[1] < SlowAvg[1]) AND (FastAvg > MedAvg AND MedAvg > SlowAvg) Then{
if Condition1 == false Then
Buy("매수정배");
Else
ExitShort();
}
If (FastAvg[1] > MedAvg[1] OR MedAvg[1] > SlowAvg[1]) AND (FastAvg < MedAvg AND MedAvg < SlowAvg) Then{
if Condition1 == false Then
Sell("매도정배");
Else
ExitLong();
}
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if stime == 90400 or ( stime > 90400 and stime[1] < 90400) and count == 0 Then{
if C >= dayopen+0.05 Then{
if Condition1 == false Then
buy("매수봉");
Else
ExitShort();
}
if C <= dayopen-0.05 Then{
if Condition1 == false Then
sell("매도봉");
Else
ExitLong();
}
}
if stime > 90400 and count >= 1 Then{
if crossup(c,highest(H,300)[1]) Then{
if Condition1 == false Then
buy("매수봉2");
Else
ExitShort();
}
if CrossDown(c,lowest(L,300)[1]) Then
if Condition1 == false Then
sell("매도봉2");
Else
ExitLong();
}
input : ATRPeriod(20),ATRS(3);
var : MaxHigh(0),MinLow(0);
if MarketPosition() == 1 then
{
exitlong("매수청산",Atstop,highest(H,barssinceentry)-ATR(ATRperiod)*ATRS);
}
if MarketPosition() == -1 then {
ExitShort("매도청산",Atstop,lowest(L,barssinceentry)+ATR(ATRperiod)*ATRS);
}
즐거운 하루되세요
> HI_ykmok1 님이 쓴 글입니다.
> 제목 : 문의
> 다음 수식은 선물 분봉적용수식입니다.
이 수식을 2번 연속 1틱(즉 0.05포인트)이상 손실이 난 경우 더 이상 진입이
안되도록 수식교정부탁드립니다.
항상 감사드립니다.
Inputs: FastLen(5), MedLen(20), SlowLen(70);
Variables: FastAvg(0), MedAvg(0), SlowAvg(0);
FastAvg = MA(Close, FastLen);
MedAvg = MA(Close, MedLen);
SlowAvg = MA(Close, SlowLen);
If (FastAvg[1] < MedAvg[1] OR MedAvg[1] < SlowAvg[1]) AND (FastAvg > MedAvg AND MedAvg > SlowAvg) Then
Buy ("매수정배");
If (FastAvg[1] > MedAvg[1] OR MedAvg[1] > SlowAvg[1]) AND (FastAvg < MedAvg AND MedAvg < SlowAvg) Then
Sell ("매도정배");
var : cnt(0),count(0);
count = 0;
for cnt = 0 to 10{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if stime == 90400 or ( stime > 90400 and stime[1] < 90400) and count == 0 Then{
if C >= dayopen+0.05 Then
buy("매수봉");
if C <= dayopen-0.05 Then
sell("매도봉");
}
if stime > 90400 and count >= 1 Then{
if crossup(c,highest(H,300)[1]) Then
buy("매수봉2");
if CrossDown(c,lowest(L,300)[1]) Then
sell("매도봉2");
}
input : ATRPeriod(20),ATRS(3);
var : MaxHigh(0),MinLow(0);
if MarketPosition() == 1 then
{
exitlong("매수청산",Atstop,highest(H,barssinceentry)-ATR(ATRperiod)*ATRS);
}
if MarketPosition() == -1 then {
ExitShort("매도청산",Atstop,lowest(L,barssinceentry)+ATR(ATRperiod)*ATRS);
}
다음글
이전글