커뮤니티
1차거래 생략
2018-05-25 08:33:54
182
글번호 119188
아래는 2회만 거래하는 buy 수식입니다.
1차는 포지션 없이 진입과 청산수식을 감시하고
2차만 실제 거래합니다.
추가 수식은 시뮬레이션을 위해 input에 반영하여 주십시요
참고로
57913건 요청내용이 시간이 걸리다고 하여 다른 수식을 요청드렸습니다.
*******************************************************************
input : b1(20),b2(20),X1(20),X2(20),진입시간(090000);
var : T1(0),entry(0),LL(0),EH(0);
if Bdate != Bdate[1] Then
T1 = TotalTrades;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 and stime >= 진입시간 and C >= daylow+PriceScale*B1 and C[1] < daylow+PriceScale*B1 Then
buy("b1");
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] Then
EH = H;
if H > EH Then
EH = H;
if entry == 1 and C <= EH-PriceScale*X1 Then
exitlong("bx1");
}
if TotalTrades > TotalTrades[1] Then
LL = L;
if L < LL Then
LL = L;
if MarketPosition == 0 and entry == 1 and stime >= 진입시간 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then
buy("b2");
if MarketPosition== 1 and entry == 2 Then
exitlong("bx2",AtStop,EntryPrice-PriceScale*X2);
답변 1
예스스탁 예스스탁 답변
2018-05-25 14:35:16
안녕하세요
예스스탁입니다.
이전 질문에 답변드린 부분과 같이 거래를 가상으로 체크해야 하는 부분은
수식을 작성해 보는데 시간이 오래걸리고 정확히 작성된다는 보장이 없어
저희가 작성을 해드리지 않습니다.
전체 신호에서 특정신호만 생략하는 부분은 모두 작성해 드리지 않습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 좌오비우오비 님이 쓴 글입니다.
> 제목 : 1차거래 생략
> 아래는 2회만 거래하는 buy 수식입니다.
1차는 포지션 없이 진입과 청산수식을 감시하고
2차만 실제 거래합니다.
추가 수식은 시뮬레이션을 위해 input에 반영하여 주십시요
참고로
57913건 요청내용이 시간이 걸리다고 하여 다른 수식을 요청드렸습니다.
*******************************************************************
input : b1(20),b2(20),X1(20),X2(20),진입시간(090000);
var : T1(0),entry(0),LL(0),EH(0);
if Bdate != Bdate[1] Then
T1 = TotalTrades;
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 and stime >= 진입시간 and C >= daylow+PriceScale*B1 and C[1] < daylow+PriceScale*B1 Then
buy("b1");
if MarketPosition == 1 Then{
if CurrentContracts > CurrentContracts[1] Then
EH = H;
if H > EH Then
EH = H;
if entry == 1 and C <= EH-PriceScale*X1 Then
exitlong("bx1");
}
if TotalTrades > TotalTrades[1] Then
LL = L;
if L < LL Then
LL = L;
if MarketPosition == 0 and entry == 1 and stime >= 진입시간 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2 Then
buy("b2");
if MarketPosition== 1 and entry == 2 Then
exitlong("bx2",AtStop,EntryPrice-PriceScale*X2);