예스스탁
예스스탁 답변
2016-04-05 10:22:46
안녕하세요
예스스탁입니다.
기존수식은 60이평 상승하락시 매매제어 인데
수식추가이므로 기존수식의 내용에 올려주신 내용 추가만 했습니다.
1.
var : T1(0),T2(0);
var1 = ma(C,20);
var2 = ma(C,60);
var3 = ma(C,200);
if var2 > var2[1] Then
T1 = 1;
if var2 < var2[1] Then
T1 = -1;
if var3 > var3[1] Then
T2 = 1;
if var3 < var3[1] Then
T2 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and NextBarOpen < var1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and NextBarOpen > var1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
2.
다른주기의 이평값을 이용하셔야 하므로
차트에 참조데이터로 30분봉 데이터를 추가하셔야 합니다.
참조데이터는 차트왼쪽 상단의 종목선택버튼 중 오른쪽을
클릭하시면 데이터를 선택해서 추가할수 있습니다.
참조데이터는 기본종목과 같은 종목을 다른주기로도 가능하며
차트에 추가되는 순서대로 data2부터 data99까지 번호가 부여되고
수식에서는 해당 데이터번호로 값을 불러와 사용합니다.
var : mav1(0,data1),mav2(0,data1),T1(0,data1);
var : mav3(0,data2),T2(0,data2);
mav1 = data1(ma(C,20));
mav2 = data1(ma(C,60));
mav3 = data2(ma(C,60));
if mav2 > mav2[1] Then
T1 = 1;
if mav2 < mav2[1] Then
T1 = -1;
if mav3 > mav3[1] Then
T2 = 1;
if mav3 < mav3[1] Then
T2 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and NextBarOpen < mav1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and NextBarOpen > mav1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
3
2번과 같이 참조데이터로 30분 데이터를 추가하고
식 적용하셔야 합니다.
var : mav1(0,data1),mav2(0,data1),mav3(0,data1),T1(0,data1),T2(0,data1);
var : mav4(0,data2),T3(0,data2);
mav1 = data1(ma(C,20));
mav2 = data1(ma(C,60));
mav3 = data1(ma(C,200));
mav4 = data2(ma(C,60));
if mav2 > mav2[1] Then
T1 = 1;
if mav2 < mav2[1] Then
T1 = -1;
if mav3 > mav3[1] Then
T2 = 1;
if mav3 < mav3[1] Then
T2 = -1;
if mav3 > mav3[1] Then
T3 = 1;
if mav3 < mav3[1] Then
T3 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and T3 == 1 and NextBarOpen < mav1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and T3 == -1 and NextBarOpen > mav1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
즐거운 하루되세요
> 상중하 님이 쓴 글입니다.
> 제목 : 한번만 더 부탁드립니다.
> 안녕하세요?
수식 정말 감사히 잘 받았습니다.
염치 없지만 한번만 더 부탁 드립니다.
어제 작성한 수식에서 추가좀 할려고 합니다.(아래참고)
1. 매수 : 200 MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 200 MA가 하락기울기이면 매도만 진입 매수 진입없슴.
2. 매수 : 30분봉에 60MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 30분봉에 60MA가 하락기울기이면 매도만 진입 매수 진입없슴.
3. 매수 : 200 MA와 30분봉에 60MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 200 MA와 30분봉에 60MA가 하락기울기이면 매도만 진입 매수 진입없슴.
진심으로 감사합니다.
var : T(0);
var1 = ma(C,20);
var2 = ma(C,60);
if var2 > var2[1] Then
T = 1;
if var2 < var2[1] Then
T = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T == 1 and NextBarOpen < var1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T == -1 and NextBarOpen > var1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
수고하셨습니다.
노고에 감사드립니다.
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 한번만 더 부탁드립니다.
> 안녕하세요
예스스탁입니다.
기존수식은 60이평 상승하락시 매매제어 인데
수식추가이므로 기존수식의 내용에 올려주신 내용 추가만 했습니다.
1.
var : T1(0),T2(0);
var1 = ma(C,20);
var2 = ma(C,60);
var3 = ma(C,200);
if var2 > var2[1] Then
T1 = 1;
if var2 < var2[1] Then
T1 = -1;
if var3 > var3[1] Then
T2 = 1;
if var3 < var3[1] Then
T2 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and NextBarOpen < var1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and NextBarOpen > var1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
2.
다른주기의 이평값을 이용하셔야 하므로
차트에 참조데이터로 30분봉 데이터를 추가하셔야 합니다.
참조데이터는 차트왼쪽 상단의 종목선택버튼 중 오른쪽을
클릭하시면 데이터를 선택해서 추가할수 있습니다.
참조데이터는 기본종목과 같은 종목을 다른주기로도 가능하며
차트에 추가되는 순서대로 data2부터 data99까지 번호가 부여되고
수식에서는 해당 데이터번호로 값을 불러와 사용합니다.
var : mav1(0,data1),mav2(0,data1),T1(0,data1);
var : mav3(0,data2),T2(0,data2);
mav1 = data1(ma(C,20));
mav2 = data1(ma(C,60));
mav3 = data2(ma(C,60));
if mav2 > mav2[1] Then
T1 = 1;
if mav2 < mav2[1] Then
T1 = -1;
if mav3 > mav3[1] Then
T2 = 1;
if mav3 < mav3[1] Then
T2 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and NextBarOpen < mav1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and NextBarOpen > mav1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
3
2번과 같이 참조데이터로 30분 데이터를 추가하고
식 적용하셔야 합니다.
var : mav1(0,data1),mav2(0,data1),mav3(0,data1),T1(0,data1),T2(0,data1);
var : mav4(0,data2),T3(0,data2);
mav1 = data1(ma(C,20));
mav2 = data1(ma(C,60));
mav3 = data1(ma(C,200));
mav4 = data2(ma(C,60));
if mav2 > mav2[1] Then
T1 = 1;
if mav2 < mav2[1] Then
T1 = -1;
if mav3 > mav3[1] Then
T2 = 1;
if mav3 < mav3[1] Then
T2 = -1;
if mav3 > mav3[1] Then
T3 = 1;
if mav3 < mav3[1] Then
T3 = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T1 == 1 and T2 == 1 and T3 == 1 and NextBarOpen < mav1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T1 == -1 and T2 == -1 and T3 == -1 and NextBarOpen > mav1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}
즐거운 하루되세요
> 상중하 님이 쓴 글입니다.
> 제목 : 한번만 더 부탁드립니다.
> 안녕하세요?
수식 정말 감사히 잘 받았습니다.
염치 없지만 한번만 더 부탁 드립니다.
어제 작성한 수식에서 추가좀 할려고 합니다.(아래참고)
1. 매수 : 200 MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 200 MA가 하락기울기이면 매도만 진입 매수 진입없슴.
2. 매수 : 30분봉에 60MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 30분봉에 60MA가 하락기울기이면 매도만 진입 매수 진입없슴.
3. 매수 : 200 MA와 30분봉에 60MA가 상승기울기이면 매수만 진입 매도 진입없슴.
매도 : 200 MA와 30분봉에 60MA가 하락기울기이면 매도만 진입 매수 진입없슴.
진심으로 감사합니다.
var : T(0);
var1 = ma(C,20);
var2 = ma(C,60);
if var2 > var2[1] Then
T = 1;
if var2 < var2[1] Then
T = -1;
if stime >= 230000 or stime < 030000 then{
if MarketPosition <= 0 and T == 1 and NextBarOpen < var1 Then
buy("b",AtStop,NextBarOpen+PriceScale*3,1);
if MarketPosition >= 0 and T == -1 and NextBarOpen > var1 Then
sell("s",AtStop,NextBarOpen-PriceScale*3,1);
}
if MarketPosition == 1 Then{
ExitLong("bp",AtLimit,EntryPrice+PriceScale*50);
ExitLong("bl",AtStop,EntryPrice-PriceScale*25);
if highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*20 Then{
ExitLong("bx1",AtStop,EntryPrice+PriceScale*1);
}
if CurrentContracts < MaxContracts Then{
ExitLong("bx2",AtStop,EntryPrice+PriceScale*1);
}
}
if MarketPosition == -1 Then{
ExitShort("sp",AtLimit,EntryPrice-PriceScale*50);
ExitShort("sl",AtStop,EntryPrice+PriceScale*25);
if Lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*20 Then{
ExitShort("sx1",AtStop,EntryPrice-PriceScale*1);
}
}