커뮤니티
부탁합니다.
2015-06-07 22:58:05
143
글번호 86896
하기식은 예스님이 작성해주신 수식입니다.
# 여기에 청산은 지금처럼 되게해주시고(조건발생시 청산),
진입은 매수는 음봉매수, 매도는 양봉매도되게 부탁드립니다.
( 예를들어 매수인경우 진입신호가 나오는 조건 이후 첫번째 음봉에서 매수신호되게 부탁드립니다.)
# 추가로 지금은 05시에 강제종료되게 되어있는데...
진입은 02시까지만 진입하고 02시 전에 진입된 포지션은 청산이 되면 매매종료되게 가능하면 부탁드립니다.( 종료시간 관계없이... 강제종료시간은 05시에 설정했으니 그전에 청산되면 매매종료되게 부탁드립니다.)
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
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 >= 090000 or stime < 020000 then{
If CrossUP(value1, value2) Then
buy();
If CrossDown(value1, value2) Then
sell();
}
}
if MarketPosition == 1 Then{
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*27 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl));
ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl));
}
if MarketPosition == -1 Then{
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*27 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl));
ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl));
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
ExitLong();
ExitShort();
}
답변 1
예스스탁 예스스탁 답변
2015-06-08 11:44:18
안녕하세요
예스스탁입니다.
음봉매수, 양봉매도조건을 추가했습니다.
두번째로 문의하신 내요은 현재 수식상 언급하신 내용으로 처리되는 식입니다.
2시 전까지만 진입하고 2시와 5시 사이에는 청산만 가능하고 청산되면 더이상 진입은 없습니다.
2시에서 5시 사이에 청산이 되지 않으면 5시에 청산됩니다.
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
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 >= 090000 or stime < 020000 then{
If CrossUP(value1, value2) and C < O Then
buy();
If CrossDown(value1, value2) and c > O Then
sell();
}
}
if MarketPosition == 1 Then{
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*27 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl));
ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl));
}
if MarketPosition == -1 Then{
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*27 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl));
ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl));
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
ExitLong();
ExitShort();
}
즐거운 하루되세요
> vmfha 님이 쓴 글입니다.
> 제목 : 부탁합니다.
> 하기식은 예스님이 작성해주신 수식입니다.
# 여기에 청산은 지금처럼 되게해주시고(조건발생시 청산),
진입은 매수는 음봉매수, 매도는 양봉매도되게 부탁드립니다.
( 예를들어 매수인경우 진입신호가 나오는 조건 이후 첫번째 음봉에서 매수신호되게 부탁드립니다.)
# 추가로 지금은 05시에 강제종료되게 되어있는데...
진입은 02시까지만 진입하고 02시 전에 진입된 포지션은 청산이 되면 매매종료되게 가능하면 부탁드립니다.( 종료시간 관계없이... 강제종료시간은 05시에 설정했으니 그전에 청산되면 매매종료되게 부탁드립니다.)
value1 = TRIX(Period);
value2 = ema(value1, sigPeriod);
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 >= 090000 or stime < 020000 then{
If CrossUP(value1, value2) Then
buy();
If CrossDown(value1, value2) Then
sell();
}
}
if MarketPosition == 1 Then{
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*27 Then{
ExitLong("bx",AtStop,EntryPrice+PriceScale*1);
}
ExitLong("bx1",AtLimit,EntryPrice+((당일수익*PriceScale)-daypl));
ExitLong("bx2",AtStop,EntryPrice-((당일손실*PriceScale)+daypl));
}
if MarketPosition == -1 Then{
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*27 Then{
ExitShort("sx",AtStop,EntryPrice-PriceScale*1);
}
ExitLong("sx1",AtLimit,EntryPrice-((당일수익*PriceScale)-daypl));
ExitLong("sx2",AtStop,EntryPrice+((당일손실*PriceScale)+daypl));
}
SetStopProfittarget(PriceScale*익절틱수, PointStop);
if stime == 050000 or (stime > 050000 and stime[1] < 050000) Then{
ExitLong();
ExitShort();
}
다음글
이전글