예스스탁
예스스탁 답변
2022-11-24 13:42:46
안녕하세요
예스스탁입니다.
var : hh(0),ll(0),sh(0),bl(0);
value1 = PriceScale*10;
Value2 = PriceScale*5;
if Bdate != Bdate[1] Then
{
hh = H;
ll = L;
}
if MarketPosition >= 0 and H < hh+value1 Then
Sell("s",AtLimit,hh+value1,1);
if MarketPosition == -1 Then
{
Sell("ss",AtLimit,hh+(value1*(MaxEntries+1)),1);
if CurrentContracts > CurrentContracts[1] Then
sh = h;
if h > sh Then
sh = h;
ExitShort("sx1",AtLimit,hh);
if CurrentEntries >= 2 Then
{
if sh >= hh+(value1*CurrentEntries)+Value2 Then
ExitShort("sx2",AtLimit,hh+(value1*CurrentEntries),"",1,2);
}
}
if MarketPosition >= 0 and L > ll-value1 Then
Buy("b",AtLimit,ll-value1,1);
if MarketPosition == 1 Then
{
Buy("bb",AtLimit,ll-(value1*(MaxEntries+1)),1);
if CurrentContracts > CurrentContracts[1] Then
bl = l;
if l < bl Then
bl = l;
ExitLong("bx1",AtLimit,ll);
if CurrentEntries >= 2 Then
{
if bl <= ll-(value1*CurrentEntries)+Value2 Then
ExitLong("bx2",AtLimit,ll+(value1*CurrentEntries),"",1,2);
}
}
즐거운 하루되세요
> 졸던 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
>
예를 들어 골드선물 10분봉 차트에서 최초 10분봉 완성이후,
현재 까지의 당일 저점과 고점이 각 1000 , 1200,
이라면, 현재가 기준으로
1) 고점 돌파
- 고점(1200)+50틱 ; 매도 진입
- 고점(1200)+100틱 ; 매도 진입
- 고점(1200)+120틱 터치시 ; 100틱에서 본절(1)
- 고점(1200)+150틱 ; 매도 진입
- 고점(1200)+170틱 터치시 ; 150틱에서 본절(1)
; 남은 계약 고점(1200)청산
2) 저점 돌파
- 저점(1000)-50틱 ; 매수 진입
- 저점(1000)-100틱 ; 매수 진입
- 저점(1000)-120틱 터치시; -100틱에서 본절(1)
- 저점(1000)-150틱 ; 매수 진입
- 저점(1000)-170틱 터치시 ; -150틱에서 본절(1)
; 남은 계약 저점(1000)청산
; 진입은 1계약 기준 입니다.
즉, 고점 돌파시 고점(1200) 청산, 저점(1000) 돌파시 저점 청산 되는 역매매 프로그램을
만들려고 하는데 잘 안되네여 도움 부탁 드립니다.