예스스탁
예스스탁 답변
2021-06-23 10:08:39
안녕하세요
예스스탁입니다.
올려주신 수식에서 매도조건 만족하면 전량청산하게 되어 있습니다. 설정에도 이상은 없습니다.
다만 이 전량청산의 의미는 실제 잔고가 아닌 차트신호로 따졌을때 청산하지 않고 남은 수량입니다.
예스랭귀지는 차트기반의 언어로 현재 차트에서 발생되어 있는 매수나 매도신호 기준으로 모든 것을 판단합니다.
현재 차트에 과거 신호가 있는지 확인해 보시기 바랍니다.
차트에 2~3일전부터 발생한 모든 매수신호가 있어야
오늘 청산시에 해당 청산되지 않은 모든 매수진입의 수량을 합산해서 전량청산을 할수가 있습니다.
과거 2~3일전의 신호가 현재 차트에 없다면 해당수량까지 청산할 방법이 없습니다.
즐거운 하루되세요
> 바나 님이 쓴 글입니다.
> 제목 : 수식확인
> 지금 사용하고 있는 수식에서 대략 하루정도 매집되는 물량은 매도신호시 전부 매도가 되는데, 2~3일이나 여러번 매수한 물량에 대해서는 일부만 매도가 되고 나머진 매도가 안되는 현상이 생깁니다. 수식문제인지 셋팅문제인지 알수가 없어서.. 확인좀 부탁드립니다.
Input : 투자금액(20000000),RSIP(14), P1(5), P2(25), P3(100), 시작일(20210618),시작시간(090000),청산시간(153000);
var : value(0),e(0),x(0),count(0),Vma(0), Tcond(false);
var : Rsiv(0),vv(0), Entry(0), mav1(0);
var1 = ma(C,p1);
var2 = ma(C,p2);
var3 = ma(C,p3);
var4 = sar(0.02,0.2);
mav1 = ma(C,30);
Rsiv = RSI(RSIP);
if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then
Tcond = true;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
if sdate >= 시작일 and stime >= 시작시간 Then
Tcond = true;
if Tcond == true then
{
if crossup(c,var4) Then
Entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and Entry < 1 and CrossUp(var1,var2) and C > var4 Then
buy("b1",OnClose,DEF,Floor((투자금액*0.05)/c));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 1 Then
buy("b2",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.07)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 2 Then
buy("b3",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 3 Then
buy("b4",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 4 Then
buy("b5",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 5 Then
buy("b6",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 6 Then
buy("b7",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 7 Then
buy("b8",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 8 Then
buy("b9",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 9 Then
buy("b10",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and
highest(l,BarsSinceEntry) >= EntryPrice*1.10 Then
ExitLong("bx");
if MarketPosition == 1 and
Rsiv > 80 Then
ExitLong("br");
if MarketPosition == 1 and Rsiv > 65 and var1 > var2 and var2 > var3 and C < var4 Then
exitlong("s");
}
2~3일전 매수신호가 잡혀있어도 총 매수 수량만큼 매도가 되지 않는 문제가 있어서 질문드린거거든요..
총 10번 분할매수인데, 8~9번 매수했다고 치면 전체매수 수량의 30~40프로 정도밖에 매도가 되지 않더라구요. 그래서 그냥 켜두면 항상 매수수량의 몇프로 이상 남아있는 문제가 생기더라구요..
수식도 설정도 이상이 없다면 방법이 없겠군요.. ㅠ
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식확인
> 안녕하세요
예스스탁입니다.
올려주신 수식에서 매도조건 만족하면 전량청산하게 되어 있습니다. 설정에도 이상은 없습니다.
다만 이 전량청산의 의미는 실제 잔고가 아닌 차트신호로 따졌을때 청산하지 않고 남은 수량입니다.
예스랭귀지는 차트기반의 언어로 현재 차트에서 발생되어 있는 매수나 매도신호 기준으로 모든 것을 판단합니다.
현재 차트에 과거 신호가 있는지 확인해 보시기 바랍니다.
차트에 2~3일전부터 발생한 모든 매수신호가 있어야
오늘 청산시에 해당 청산되지 않은 모든 매수진입의 수량을 합산해서 전량청산을 할수가 있습니다.
과거 2~3일전의 신호가 현재 차트에 없다면 해당수량까지 청산할 방법이 없습니다.
즐거운 하루되세요
> 바나 님이 쓴 글입니다.
> 제목 : 수식확인
> 지금 사용하고 있는 수식에서 대략 하루정도 매집되는 물량은 매도신호시 전부 매도가 되는데, 2~3일이나 여러번 매수한 물량에 대해서는 일부만 매도가 되고 나머진 매도가 안되는 현상이 생깁니다. 수식문제인지 셋팅문제인지 알수가 없어서.. 확인좀 부탁드립니다.
Input : 투자금액(20000000),RSIP(14), P1(5), P2(25), P3(100), 시작일(20210618),시작시간(090000),청산시간(153000);
var : value(0),e(0),x(0),count(0),Vma(0), Tcond(false);
var : Rsiv(0),vv(0), Entry(0), mav1(0);
var1 = ma(C,p1);
var2 = ma(C,p2);
var3 = ma(C,p3);
var4 = sar(0.02,0.2);
mav1 = ma(C,30);
Rsiv = RSI(RSIP);
if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then
Tcond = true;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
if sdate >= 시작일 and stime >= 시작시간 Then
Tcond = true;
if Tcond == true then
{
if crossup(c,var4) Then
Entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and Entry < 1 and CrossUp(var1,var2) and C > var4 Then
buy("b1",OnClose,DEF,Floor((투자금액*0.05)/c));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 1 Then
buy("b2",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.07)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 2 Then
buy("b3",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 3 Then
buy("b4",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 4 Then
buy("b5",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 5 Then
buy("b6",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 6 Then
buy("b7",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 7 Then
buy("b8",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 8 Then
buy("b9",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 9 Then
buy("b10",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and
highest(l,BarsSinceEntry) >= EntryPrice*1.10 Then
ExitLong("bx");
if MarketPosition == 1 and
Rsiv > 80 Then
ExitLong("br");
if MarketPosition == 1 and Rsiv > 65 and var1 > var2 and var2 > var3 and C < var4 Then
exitlong("s");
}
예스스탁
예스스탁 답변
2021-06-23 16:31:26
안녕하세요
예스스탁입니다.
이전일의 신호가 그대로 있으면 수식상으로는 전량청산입니다.
차트에 청산후에 숫자0이 표시되는지 확인하시기 바랍니다.
신호상 진입수량 전량으로 청산주문이 나갔는데
미체결되어 남아 있는 부분은 수식상 처리할 방법이 없습니다.
수동으로 정리해 주셔야 합니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 바나 님이 쓴 글입니다.
> 제목 : Re : Re : 수식확인
> 2~3일전 매수신호가 잡혀있어도 총 매수 수량만큼 매도가 되지 않는 문제가 있어서 질문드린거거든요..
총 10번 분할매수인데, 8~9번 매수했다고 치면 전체매수 수량의 30~40프로 정도밖에 매도가 되지 않더라구요. 그래서 그냥 켜두면 항상 매수수량의 몇프로 이상 남아있는 문제가 생기더라구요..
수식도 설정도 이상이 없다면 방법이 없겠군요.. ㅠ
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식확인
> 안녕하세요
예스스탁입니다.
올려주신 수식에서 매도조건 만족하면 전량청산하게 되어 있습니다. 설정에도 이상은 없습니다.
다만 이 전량청산의 의미는 실제 잔고가 아닌 차트신호로 따졌을때 청산하지 않고 남은 수량입니다.
예스랭귀지는 차트기반의 언어로 현재 차트에서 발생되어 있는 매수나 매도신호 기준으로 모든 것을 판단합니다.
현재 차트에 과거 신호가 있는지 확인해 보시기 바랍니다.
차트에 2~3일전부터 발생한 모든 매수신호가 있어야
오늘 청산시에 해당 청산되지 않은 모든 매수진입의 수량을 합산해서 전량청산을 할수가 있습니다.
과거 2~3일전의 신호가 현재 차트에 없다면 해당수량까지 청산할 방법이 없습니다.
즐거운 하루되세요
> 바나 님이 쓴 글입니다.
> 제목 : 수식확인
> 지금 사용하고 있는 수식에서 대략 하루정도 매집되는 물량은 매도신호시 전부 매도가 되는데, 2~3일이나 여러번 매수한 물량에 대해서는 일부만 매도가 되고 나머진 매도가 안되는 현상이 생깁니다. 수식문제인지 셋팅문제인지 알수가 없어서.. 확인좀 부탁드립니다.
Input : 투자금액(20000000),RSIP(14), P1(5), P2(25), P3(100), 시작일(20210618),시작시간(090000),청산시간(153000);
var : value(0),e(0),x(0),count(0),Vma(0), Tcond(false);
var : Rsiv(0),vv(0), Entry(0), mav1(0);
var1 = ma(C,p1);
var2 = ma(C,p2);
var3 = ma(C,p3);
var4 = sar(0.02,0.2);
mav1 = ma(C,30);
Rsiv = RSI(RSIP);
if NextBarSdate >= 시작일 and NextBarStime >= 시작시간 Then
Tcond = true;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
count = count+1;
if sdate >= 시작일 and stime >= 시작시간 Then
Tcond = true;
if Tcond == true then
{
if crossup(c,var4) Then
Entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and Entry < 1 and CrossUp(var1,var2) and C > var4 Then
buy("b1",OnClose,DEF,Floor((투자금액*0.05)/c));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 1 Then
buy("b2",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.07)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossUp(var1,var2) and Rsiv < 70 and C > var4 and MaxEntries == 2 Then
buy("b3",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 3 Then
buy("b4",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.08)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 4 Then
buy("b5",atlimit,LatestEntryPrice(0)*0.99,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and CrossDown(Rsiv, 30) and MaxEntries == 5 Then
buy("b6",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.10)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 6 Then
buy("b7",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 7 Then
buy("b8",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.12)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 8 Then
buy("b9",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and Entry < 1 and Crossup(Rsiv, 30) and MaxEntries == 9 Then
buy("b10",atlimit,LatestEntryPrice(0)*1.00,Floor((투자금액*0.14)/min(NextBarOpen,LatestEntryPrice(0)*0.98)));
if MarketPosition == 1 and
highest(l,BarsSinceEntry) >= EntryPrice*1.10 Then
ExitLong("bx");
if MarketPosition == 1 and
Rsiv > 80 Then
ExitLong("br");
if MarketPosition == 1 and Rsiv > 65 and var1 > var2 and var2 > var3 and C < var4 Then
exitlong("s");
}