커뮤니티
부탁드립니다.
2015-06-16 00:25:19
105
글번호 87233
input : ,익절틱수(10);
Input : af(0.02), maxAF(0.2);
Input : SonarP(12), SonarS(9);
input : g(25),r(50),s(2);
var : SonarV(0),SonarSig(0);
var : SMIv(0),T(0);
var1 = SAR(af,maxAF);
SonarV = SONAR(SonarP);
SonarSig = ema(SonarV,SonarS);
SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 /
(0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ;
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
# 매수/매도청산
If C > var1 and SonarSig > SonarSig[1] and T == 1 Then
{
Buy();
}
# 매도/매수청산
If C < var1 and SonarSig < SonarSig[1] and T == -1 Then
{
Sell();
}
{
if MarketPosition == 1 and C < var1 and SonarSig < SonarSig[1] Then{
ExitLong();
}
}
{
if MarketPosition == -1 and C > var1 and SonarSig > SonarSig[1] Then{
ExitShort();
}
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
다시 부탁드립니다.
상기식으로 정상적으로 신호발생이 되는것 같은데...
시간이 들어가면 신호가 잘 안나오네요.
1. 상기식에서 익절틱수( PointStop )로 익절되었을경우.
다른진입신호나 반대신호외는 신호발생금지.
( 어제주신수식은 익절후 다음봉에서 같은방향 신호가나오네요.)
2.상기 1식에서 진입시간은 09:00에서 다음날 새벽 02:00 매매강제종료는 새벽05:00
3. 상기 2식에서 20일 이평선의 기울기 반대인 진입신호 발생금지.
(예; 20일 이평선의 기울기가 상승이면 매수신호만, 청산신호는 조건만족되면 정상적으로 청산)
부탁드립니다.
답변 1
예스스탁 예스스탁 답변
2015-06-16 13:11:39
안녕하세요
예스스탁입니다.
input : 익절틱수(10);
Input : af(0.02), maxAF(0.2);
Input : SonarP(12), SonarS(9);
input : g(25),r(50),s(2);
input : P(20);
var : SonarV(0),SonarSig(0);
var : SMIv(0),T(0),lcnt(0),mav(0);
var1 = SAR(af,maxAF);
SonarV = SONAR(SonarP);
SonarSig = ema(SonarV,SonarS);
SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 /
(0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ;
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
mav = ma(c,P);
if stime == 090000 or (stime > 090000 and stime[1] < 090000) Then
Lcnt = 0;
if BarsSinceExit(1) == 1 and IsExitName("StopProfitTarget",1) == true then{
Lcnt = Lcnt+1;
}
if (stime >= 090000 or 020000) and Lcnt < 1 then{
If C > var1 and SonarSig > SonarSig[1] and T == 1 Then
{
if mav > mav[1] Then
Buy();
Else
ExitShort();
}
If C < var1 and SonarSig < SonarSig[1] and T == -1 and mav < mav[1] Then
{
if mav < mav[1] Then
Sell();
Else
ExitLong();
}
}
if MarketPosition == 1 and C < var1 and SonarSig < SonarSig[1] Then{
ExitLong();
}
if MarketPosition == -1 and C > var1 and SonarSig > SonarSig[1] Then{
ExitShort();
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
if stime == 050000 or (stime > 050000 and stime < 050000) Then{
exitlong();
ExitShort();
}
즐거운 하루되세요
> vmfha 님이 쓴 글입니다.
> 제목 : 부탁드립니다.
> input : ,익절틱수(10);
Input : af(0.02), maxAF(0.2);
Input : SonarP(12), SonarS(9);
input : g(25),r(50),s(2);
var : SonarV(0),SonarSig(0);
var : SMIv(0),T(0);
var1 = SAR(af,maxAF);
SonarV = SONAR(SonarP);
SonarSig = ema(SonarV,SonarS);
SMIv = ema(ema(c-(highest(H,g) + lowest(L,g))*0.5, r),s) * 100 /
(0.5 * ema(ema(highest(H,g)-lowest(L,g),r),s)) ;
if SMIv > SMIv[1] Then
T = 1;
if SMIv < SMIv[1] Then
T = -1;
# 매수/매도청산
If C > var1 and SonarSig > SonarSig[1] and T == 1 Then
{
Buy();
}
# 매도/매수청산
If C < var1 and SonarSig < SonarSig[1] and T == -1 Then
{
Sell();
}
{
if MarketPosition == 1 and C < var1 and SonarSig < SonarSig[1] Then{
ExitLong();
}
}
{
if MarketPosition == -1 and C > var1 and SonarSig > SonarSig[1] Then{
ExitShort();
}
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
다시 부탁드립니다.
상기식으로 정상적으로 신호발생이 되는것 같은데...
시간이 들어가면 신호가 잘 안나오네요.
1. 상기식에서 익절틱수( PointStop )로 익절되었을경우.
다른진입신호나 반대신호외는 신호발생금지.
( 어제주신수식은 익절후 다음봉에서 같은방향 신호가나오네요.)
2.상기 1식에서 진입시간은 09:00에서 다음날 새벽 02:00 매매강제종료는 새벽05:00
3. 상기 2식에서 20일 이평선의 기울기 반대인 진입신호 발생금지.
(예; 20일 이평선의 기울기가 상승이면 매수신호만, 청산신호는 조건만족되면 정상적으로 청산)
부탁드립니다.