예스스탁
예스스탁 답변
2020-10-26 13:42:25
안녕하세요
예스스탁입니다.
현재 작성된 식이
가격이 지정한 가격 아래에 있다가 위로 올라가면서 터치할때만 진입하게 되어 있습니다.
위와래 관계없이 터치하면 진입하게 수정해 드립니다.
input : ndate(20201016),매수가1(1000),매수가2(900),매도가1(1100),매도가2(950), 손절가(800);
input : 매수수량1(50),매수수량2(80);
if sDate >= ndate Then
{
if MarketPosition == 0 and totalTrades == 0 Then
{
if NextBarOpen >= 매수가1 Then
Buy("b1",AtLimit,매수가1,매수수량1);
Else
Buy("b1.",AtStop,매수가1,매수수량1);
}
if MarketPosition == 1 and MaxEntries == 1 Then
{
ExitLong("bp1",AtLimit,매도가1);
if NextBarOpen >= 매수가2 Then
Buy("b2",AtLimit,매수가2,매수수량2);
Else
Buy("b2.",AtStop,매수가2,매수수량2);
}
if MarketPosition == 1 and MaxEntries == 2 Then
{
ExitLong("bp2",AtLimit,매도가2);
ExitLong("bl",AtStop,손절가);
}
}
즐거운 하루되세요
> 스누피독 님이 쓴 글입니다.
> 제목 : 식문의드립니다
> 안녕하세요 , 식문의드립니다.
이전 아래식 문의드렸는데
진입이 해당가격에 다았는데도 발생되지않고
봉이 몇번씩 해당가격을 지나간후 매수가 됩니다
해당가격에 다으면 바로 진입부탁드립니다
input : ndate(20201016),매수가1(1000),매수가2(900),매도가1(1100),매도가2(950), 손절가(800);
input : 매수수량1(50),매수수량2(80);
if sDate >= ndate Then
{
if MarketPosition == 0 and l > 매수가1 and TotalTrades == 0 Then
Buy("b1",AtLimit,매수가1,매수수량1);
if MarketPosition == 1 and MaxEntries == 1 Then
{
ExitLong("bp1",AtLimit,매도가1);
if l > 매수가2 Then
Buy("b2",AtLimit,매수가2,매수수량2);
}
if MarketPosition == 1 and MaxEntries == 2 Then
{
ExitLong("bp2",AtLimit,매도가2);
ExitLong("bl",AtStop,손절가);
}
}