커뮤니티
진입시간 조정
2015-09-25 10:16:24
142
글번호 90716
아래와 같은 수식에서 진입하면 시초부터 손실이 발생하는 결과가 나와서 진입시간을 9시 30분에서 당일 청산을 2시55분으로 추가 하려고 하는데요.
도움 부탁드립니다. 제가 책보고 하니까 자꾸 아래 수식에 영향을 주는 에러가 나와서 잘 안되네요..^^:
간단한 수식도 초보에겐 어렵네요..
Inputs: 청산틱수(20);
if MarketPosition <= 0 Then
buy("b",AtStop,highest(H,5)+PriceScale);
if MarketPosition >= 0 Then
sell("s",AtStop,Lowest(L,5)-PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*청산틱수);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*청산틱수);
답변 1
예스스탁 예스스탁 답변
2015-09-25 11:44:26
안녕하세요
예스스탁입니다.
Inputs: 청산틱수(20);
if MarketPosition <= 0 and stime >= 93000 and stime < 145500 Then
buy("b",AtStop,highest(H,5)+PriceScale);
if MarketPosition >= 0 and stime >= 93000 and stime < 145500 Then
sell("s",AtStop,Lowest(L,5)-PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*청산틱수);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*청산틱수);
SetStopEndofday(145500);
신호타입중 atstop이나 atlimit은
봉완성시 가격을 셋팅하고 다음봉을 감시합니다.
아침 첫봉에 신호가 발생했다면
전일 마지막봉에서 셋팅이 되서 다음봉인 다음날 첫봉에 신호가 발생된것입니다.
그러므로 첫봉에 신호가 나오는 것만 막으려고 하신다면
9시 30분부터 시작은 제외하고
끝시간만 지정하셔도 됩니다.
Inputs: 청산틱수(20);
if MarketPosition <= 0 and stime < 145500 Then
buy("b",AtStop,highest(H,5)+PriceScale);
if MarketPosition >= 0 and stime < 145500 Then
sell("s",AtStop,Lowest(L,5)-PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*청산틱수);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*청산틱수);
SetStopEndofday(145500);
즐거운 한가위 되시기 바랍니다.
> 싸이클론 님이 쓴 글입니다.
> 제목 : 진입시간 조정
> 아래와 같은 수식에서 진입하면 시초부터 손실이 발생하는 결과가 나와서 진입시간을 9시 30분에서 당일 청산을 2시55분으로 추가 하려고 하는데요.
도움 부탁드립니다. 제가 책보고 하니까 자꾸 아래 수식에 영향을 주는 에러가 나와서 잘 안되네요..^^:
간단한 수식도 초보에겐 어렵네요..
Inputs: 청산틱수(20);
if MarketPosition <= 0 Then
buy("b",AtStop,highest(H,5)+PriceScale);
if MarketPosition >= 0 Then
sell("s",AtStop,Lowest(L,5)-PriceScale);
if MarketPosition == 1 Then
exitlong("bx",AtStop,highest(H,BarsSinceEntry)-PriceScale*청산틱수);
if MarketPosition == -1 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*청산틱수);
다음글
이전글