커뮤니티
부탁 드립니다.
2015-07-07 09:34:34
118
글번호 88075
예스스탁 님~~!
안녕 하세요?
42851번에 재 문의 드린 내용 부탁 드립니다.
답변 1
예스스탁 예스스탁 답변
2015-07-07 13:09:46
안녕하세요
예스스탁입니다.
input : Left(3),Right(3),종료시간(50000);
var : SHcount(0),SHdate(0),SHtime(0),SHvalH(0);
var : PreSHdate(0),PreSHtime(0),PreSHvalH(0),Shidx(0), TL1(0);
var : SLcount(0),SLdate(0),SLtime(0),SLvalL(0);
var : PreSLdate(0),PreSLtime(0),PreSLvalL(0),SLidx(0), TL2(0);
var : TL11(0),TL12(0),TL21(0),TL22(0);
if Swinghigh(1,H,Left,Right,Left+Right+1) != -1 Then{ #1
SHcount = SHcount +1;#2
SHdate = sdate[Right];#3
SHtime = stime[Right];#4
SHvalH = H[Right];#5
PreSHdate = SHdate[1];#6
PreSHtime = SHtime[1];#7
PreSHvalH = SHvalH[1];#8
if Shcount >= 2 and SHvalH > PreSHvalH Then #9
{
TL1= TL_New(PreSHdate, PreSHtime, PreSHvalH, SHdate,SHtime,SHvalH);#10
TL_Delete(TL11);
TL_Delete(TL12);
TL11 = TL_New(SHdate, SHtime, PreSHvalH, sdate,stime,PreSHvalH);
TL12 = TL_New(SHdate, SHtime, SHvalH, sDate,stime,SHvalH);
TL_SetColor(TL1,RED);
TL_SetColor(TL11,RED);
TL_SetColor(TL12,RED);
TL_SetExtRight(TL11,true);
TL_SetExtRight(TL12,true);
buy("b");
}
}
if SwingLow(1,L,Left,Right,Left+Right+1) != -1 Then{ #1
SLcount = SLcount +1;#2
SLdate = sdate[Right];#3
SLtime = stime[Right];#4
SLvalL = L[Right];#5
PreSLdate = SLdate[1];#6
PreSLtime = SLtime[1];#7
PreSLvalL = SLvalL[1];#8
if SLcount >= 2 and SLvalL < PreSLvalL Then #9
{
TL2 = TL_New(PreSLdate, PreSLtime, PreSLvalL, SLdate,SLtime,SLvalL);#10
TL_Delete(TL21);
TL_Delete(TL22);
TL21 = TL_New(SLdate, SLtime, PreSLvalL, sdate,stime,PreSLvalL);
TL22 = TL_New(SLdate, SLtime, SLvalL, sDate,stime,SLvalL);
TL_SetColor(TL2,BLUE);
TL_SetColor(TL21,BLUE);
TL_SetColor(TL22,blue);
TL_SetExtRight(TL21,true);
TL_SetExtRight(TL22,true);
Sell("s");
}
}
if MarketPosition == 1 Then{
exitlong("bl",AtStop,EntryPrice-PriceScale*20);
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*20 And
highest(h,BarsSinceEntry) < EntryPrice+PriceScale*40 Then
exitlong("bx1",AtStop,highest(h,BarsSinceEntry)-PriceScale*10);
if highest(h,BarsSinceEntry) >= EntryPrice+PriceScale*40 Then
exitlong("bx2",AtStop,highest(h,BarsSinceEntry)-PriceScale*20);
}
if MarketPosition == -1 Then{
ExitShort("sl",AtStop,EntryPrice+PriceScale*20);
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*20 And
Lowest(l,BarsSinceEntry) > EntryPrice-PriceScale*40 Then
exitlong("sx1",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*10);
if Lowest(l,BarsSinceEntry) <= EntryPrice-PriceScale*40 Then
exitlong("sx2",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*20);
}
if stime == 종료시간 or (stime > 종료시간 and stime[1] < 종료시간) Then{
ExitLong();
ExitShort();
}
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 예스스탁 님~~!
안녕 하세요?
42851번에 재 문의 드린 내용 부탁 드립니다.