커뮤니티
수정해주세요-------------
2012-02-28 08:53:36
281
글번호 48287
if MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("b본",1) == true
Then{
if Lowest(L,BarsSinceExit(1)) <= ExitPrice(1)-PriceScale*7 Then
buy("rebuy",AtStop,ExitPrice(1));
}
if MarketPosition == 0 and MarketPosition(1) == -1 and IsExitName("s본",1) == true
Then{
if Highest(H,BarsSinceExit(1)) >= ExitPrice(1)+PriceScale*7 Then
Sell("resell",AtStop,ExitPrice(1));
}
위와같이 적용하니 전일의 "b본","s본" 까지 참고해서 "rebuy","resell"을 실행하는데
이를 당일의 "b본","s본"만 참고하게 해주세요
답변 1
예스스탁 예스스탁 답변
2012-02-28 11:46:30
안녕하세요
예스스탁입니다.
if MarketPosition == 0 and MarketPosition(1) == 1 and ExitDate(1) == sdate and IsExitName("b본",1) == true
Then{
if Lowest(L,BarsSinceExit(1)) <= ExitPrice(1)-PriceScale*7 Then
buy("rebuy",AtStop,ExitPrice(1));
}
if MarketPosition == 0 and MarketPosition(1) == -1 and ExitDate(1) == sdate and IsExitName("s본",1) == true
Then{
if Highest(H,BarsSinceExit(1)) >= ExitPrice(1)+PriceScale*7 Then
Sell("resell",AtStop,ExitPrice(1));
}
즐거운 하루되세요
> leekss1 님이 쓴 글입니다.
> 제목 : 수정해주세요-------------
> if MarketPosition == 0 and MarketPosition(1) == 1 and IsExitName("b본",1) == true
Then{
if Lowest(L,BarsSinceExit(1)) <= ExitPrice(1)-PriceScale*7 Then
buy("rebuy",AtStop,ExitPrice(1));
}
if MarketPosition == 0 and MarketPosition(1) == -1 and IsExitName("s본",1) == true
Then{
if Highest(H,BarsSinceExit(1)) >= ExitPrice(1)+PriceScale*7 Then
Sell("resell",AtStop,ExitPrice(1));
}
위와같이 적용하니 전일의 "b본","s본" 까지 참고해서 "rebuy","resell"을 실행하는데
이를 당일의 "b본","s본"만 참고하게 해주세요