If c > ma(c,20)
Then
buy("Cr");
if c < ma(c,20)
Then
Sell("Cr*");
If MarketPosition == 1
Then
{
ExitLong("청",AtStop,L[BarsSinceEntry]);
if LatestexitName(0) == "청" Then
Sell("SW*",AtStop,c);
}
If MarketPosition == -1
Then
{
ExitShort("청*",AtStop,H[BarsSinceEntry]);
if LatestexitName(0) == "청*" Then
Buy("SW",AtStop,c);
}
수식문의드립니다.
진입한다음 손절후 스위칭 시스템을 만들고 싶은데
윗 식으로하면 손절은 실시간으로 나가는데 스위칭진입이 봉의 종가에 나가게 됩니다.
손절과 동시에 스위칭 진입이 같은위치에 동시에 나오게 하고 싶습니다.
답변 1
예스스탁
예스스탁 답변
2023-06-07 13:27:51
안녕하세요
예스스탁입니다.
청산함수가 아닌 반대방향 진입함수를 사용하시면 됩니다.
If c > ma(c,20)
Then
buy("Cr");
if c < ma(c,20)
Then
Sell("Cr*");
If MarketPosition == 1
Then
{
Sell("청",AtStop,L[BarsSinceEntry]);
}
If MarketPosition == -1
Then
{
Buy("청*",AtStop,H[BarsSinceEntry]);
}
즐거운 하루되세요
> 수다리 님이 쓴 글입니다.
> 제목 : 시스템 문의드립니다.
> If c > ma(c,20)
Then
buy("Cr");
if c < ma(c,20)
Then
Sell("Cr*");
If MarketPosition == 1
Then
{
ExitLong("청",AtStop,L[BarsSinceEntry]);
if LatestexitName(0) == "청" Then
Sell("SW*",AtStop,c);
}
If MarketPosition == -1
Then
{
ExitShort("청*",AtStop,H[BarsSinceEntry]);
if LatestexitName(0) == "청*" Then
Buy("SW",AtStop,c);
}
수식문의드립니다.
진입한다음 손절후 스위칭 시스템을 만들고 싶은데
윗 식으로하면 손절은 실시간으로 나가는데 스위칭진입이 봉의 종가에 나가게 됩니다.
손절과 동시에 스위칭 진입이 같은위치에 동시에 나오게 하고 싶습니다.