커뮤니티
문의드립니다.
2015-05-28 07:14:33
132
글번호 86486
하기수식은 예스스탁님이 작성해주신...
- 하루수익 100틱이상이면 시간관계없이 매매종료된다고 작성해주셨는데...
오일에 적용중인데... 수익이 100틱이 넘어도 매매가 03시까지 이어지네요.
혹 당일수익이 오일에서 20시~익일03시까지 날짜가 넘어 그런건 아닌지?
( 만약 그렇다면 예를들어 당일 00시~ 03시 수익이 90틱이라면 20시에 매매시작되면 10틱수익이면 매매종료될것 같은데..)
그렇다고 하면 매매시간내 (20시~익일 03시) 100틱수익이면 종료될수있게 부탁드립니다.
input : 당일수익(100);#틱수
var : NP(0),PreNP(0),dayPL(0),Econd(false);
input : g(11),r(25),s(2),P(10);
var : SMIV(0),SMIS(0);
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)) ;
SMIS = ema(SMIV,p);
NP = NetProfit;
if bdate != bdate[1] Then{
PreNP = NP[1];
Econd = false;
}
dayPL = NP-PreNP;
if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then
Econd = true;
if Econd == false Then{
if stime >= 200000 or stime < 030000 then{
if crossup(SMIV,SMIS) Then
buy();
if CrossDown(SMIV,SMIS) Then
sell();
}
}
if MarketPosition == 1 Then{
exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10);
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+(당일수익-daypl));
}
if MarketPosition == -1 Then{
ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10);
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitShort("sx1",AtLimit,EntryPrice-(당일수익-daypl) );
}
if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{
ExitLong();
ExitShort();
}
미리감사드립니다.
답변 1
예스스탁 예스스탁 답변
2015-05-29 09:44:48
안녕하세요
예스스탁입니다.
최송합니다. 청산식에 틱수를 모인트로 변경하는 내용이 없었습니다.
수정한 식입니다
input : 당일수익(100);#틱수
var : NP(0),PreNP(0),dayPL(0),Econd(false);
input : g(11),r(25),s(2),P(10);
var : SMIV(0),SMIS(0);
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)) ;
SMIS = ema(SMIV,p);
NP = NetProfit;
if bdate != bdate[1] Then{
PreNP = NP[1];
Econd = false;
}
dayPL = NP-PreNP;
if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then
Econd = true;
if Econd == false Then{
if stime >= 200000 or stime < 030000 then{
if crossup(SMIV,SMIS) Then
buy();
if CrossDown(SMIV,SMIS) Then
sell();
}
}
if MarketPosition == 1 Then{
exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10);
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl));
}
if MarketPosition == -1 Then{
ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10);
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitShort("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl) );
}
if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{
ExitLong();
ExitShort();
}
즐거운 하루되세요
> vmfha 님이 쓴 글입니다.
> 제목 : 문의드립니다.
> 하기수식은 예스스탁님이 작성해주신...
- 하루수익 100틱이상이면 시간관계없이 매매종료된다고 작성해주셨는데...
오일에 적용중인데... 수익이 100틱이 넘어도 매매가 03시까지 이어지네요.
혹 당일수익이 오일에서 20시~익일03시까지 날짜가 넘어 그런건 아닌지?
( 만약 그렇다면 예를들어 당일 00시~ 03시 수익이 90틱이라면 20시에 매매시작되면 10틱수익이면 매매종료될것 같은데..)
그렇다고 하면 매매시간내 (20시~익일 03시) 100틱수익이면 종료될수있게 부탁드립니다.
input : 당일수익(100);#틱수
var : NP(0),PreNP(0),dayPL(0),Econd(false);
input : g(11),r(25),s(2),P(10);
var : SMIV(0),SMIS(0);
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)) ;
SMIS = ema(SMIV,p);
NP = NetProfit;
if bdate != bdate[1] Then{
PreNP = NP[1];
Econd = false;
}
dayPL = NP-PreNP;
if BarsSinceExit(1) == 1 and (IsExitName("bx1",1) or IsExitName("sx1",1)) Then
Econd = true;
if Econd == false Then{
if stime >= 200000 or stime < 030000 then{
if crossup(SMIV,SMIS) Then
buy();
if CrossDown(SMIV,SMIS) Then
sell();
}
}
if MarketPosition == 1 Then{
exitlong("BL",AtStop,O[BarsSinceEntry]-PriceScale*10);
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+(당일수익-daypl));
}
if MarketPosition == -1 Then{
ExitShort("SL",AtStop,O[BarsSinceEntry]+PriceScale*10);
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitShort("sx1",AtLimit,EntryPrice-(당일수익-daypl) );
}
if stime == 030000 or (stime > 030000 and stime[1] < 030000) Then{
ExitLong();
ExitShort();
}
미리감사드립니다.
다음글
이전글