커뮤니티
수식 문의 드립니다.
2014-02-05 13:23:14
154
글번호 72199
시스템 익절과 손절 전략을 코딩으로 하니 꼬리로 틱으로 찍기만 해도 청산이 된 것으로 나오는데요. 이것을 좀 보완하고 싶습니다.
1) 코딩으로 완성캔들시(1분봉 시스템 기준) 청산이 나가게끔 하려면 어떻게 하면 되나요?
(꼬리로 찍기만이 아닌 종가캔들로 목표치를 닿아야)
2) 다른 방법으로 가격으로 청산위치를 도달하지만, 1분봉 기준 거래량이 100개 이상 되어야만 청산이 된 것으로도 구현 할 수 있을지 궁금합니다.
3) 그리고 2번에 추가해서 청산위치 가격 거래량이 100개 이상 체결되는지로 청산이 되게끔 하는 것도 가능한지 문의드립니다.
건강 유념하시구요. 매번 답변 감사합니다.
================================================================================
아래는 일전에 문의 드렸던 시스템에서 11시~13시 사이에서 청산과 손절 전략으로 진입가 대비
2틱 익절 / 6틱 손절 // 나머지는 4틱익절, 6틱 손절 코딩 참고적으로 올립니다.
if stime >= 110000 and stime < 130000 Then{
if MarketPosition == 1 Then{
ExitLong("1",AtLimit,EntryPrice+PriceScale*2);
ExitLong("2",AtStop,EntryPrice-PriceScale*6);
}
if MarketPosition == -1 Then{
ExitShort("3",AtLimit,EntryPrice-PriceScale*2);
ExitShort("4",AtStop,EntryPrice+PriceScale*6);
}
}
Else{
if MarketPosition == 1 Then{
ExitLong("5",AtLimit,EntryPrice+PriceScale*4);
ExitLong("6",AtStop,EntryPrice-PriceScale*6);
}
if MarketPosition == -1 Then{
ExitShort("7",AtLimit,EntryPrice-PriceScale*4);
ExitShort("8",AtStop,EntryPrice+PriceScale*6);
}
}
답변 1
예스스탁 예스스탁 답변
2014-02-05 16:15:11
안녕하세요
예스스탁입니다.
1.
if stime >= 110000 and stime < 130000 Then{
if MarketPosition == 1 Then{
if C >= EntryPrice+PriceScale*2 Then
ExitLong("1");
if C <= EntryPrice-PriceScale*6 Then
ExitLong("2");
}
if MarketPosition == -1 Then{
if C <= EntryPrice-PriceScale*2 Then
ExitShort("3");
if C >= EntryPrice+PriceScale*6 Then
ExitShort("4");
}
}
Else{
if MarketPosition == 1 Then{
if C >= EntryPrice+PriceScale*4 Then
ExitLong("5");
if C <= EntryPrice-PriceScale*6 Then
ExitLong("6");
}
if MarketPosition == -1 Then{
if C <= EntryPrice-PriceScale*4 Then
ExitShort("7");
if C >= EntryPrice+PriceScale*6 Then
ExitShort("8");
}
}
2.
if stime >= 110000 and stime < 130000 and V >= 100 Then{
if MarketPosition == 1 Then{
if C >= EntryPrice+PriceScale*2 Then
ExitLong("1");
if C <= EntryPrice-PriceScale*6 Then
ExitLong("2");
}
if MarketPosition == -1 Then{
if C <= EntryPrice-PriceScale*2 Then
ExitShort("3");
if C >= EntryPrice+PriceScale*6 Then
ExitShort("4");
}
}
Else{
if MarketPosition == 1 and V >= 100 Then{
if C >= EntryPrice+PriceScale*4 Then
ExitLong("5");
if C <= EntryPrice-PriceScale*6 Then
ExitLong("6");
}
if MarketPosition == -1 Then{
if C <= EntryPrice-PriceScale*4 Then
ExitShort("7");
if C >= EntryPrice+PriceScale*6 Then
ExitShort("8");
}
}
3.
수식에서는 하나이 봉의 특정시세의 거래량은 판단이 되지 않아
문의하신 내용은 작성이 가능하지 않습니다.
즐거운 하루되세요
> 로렌스 님이 쓴 글입니다.
> 제목 : 수식 문의 드립니다.
> 시스템 익절과 손절 전략을 코딩으로 하니 꼬리로 틱으로 찍기만 해도 청산이 된 것으로 나오는데요. 이것을 좀 보완하고 싶습니다.
1) 코딩으로 완성캔들시(1분봉 시스템 기준) 청산이 나가게끔 하려면 어떻게 하면 되나요?
(꼬리로 찍기만이 아닌 종가캔들로 목표치를 닿아야)
2) 다른 방법으로 가격으로 청산위치를 도달하지만, 1분봉 기준 거래량이 100개 이상 되어야만 청산이 된 것으로도 구현 할 수 있을지 궁금합니다.
3) 그리고 2번에 추가해서 청산위치 가격 거래량이 100개 이상 체결되는지로 청산이 되게끔 하는 것도 가능한지 문의드립니다.
건강 유념하시구요. 매번 답변 감사합니다.
================================================================================
아래는 일전에 문의 드렸던 시스템에서 11시~13시 사이에서 청산과 손절 전략으로 진입가 대비
2틱 익절 / 6틱 손절 // 나머지는 4틱익절, 6틱 손절 코딩 참고적으로 올립니다.
if stime >= 110000 and stime < 130000 Then{
if MarketPosition == 1 Then{
ExitLong("1",AtLimit,EntryPrice+PriceScale*2);
ExitLong("2",AtStop,EntryPrice-PriceScale*6);
}
if MarketPosition == -1 Then{
ExitShort("3",AtLimit,EntryPrice-PriceScale*2);
ExitShort("4",AtStop,EntryPrice+PriceScale*6);
}
}
Else{
if MarketPosition == 1 Then{
ExitLong("5",AtLimit,EntryPrice+PriceScale*4);
ExitLong("6",AtStop,EntryPrice-PriceScale*6);
}
if MarketPosition == -1 Then{
ExitShort("7",AtLimit,EntryPrice-PriceScale*4);
ExitShort("8",AtStop,EntryPrice+PriceScale*6);
}
}
다음글
이전글