커뮤니티
변경바랍니다
2014-02-07 23:10:41
187
글번호 72340
안녕하세요..아래식을 data2로 참조해서 콜옵션을 메인으로 해서 거래하고자 하는데
전환하는게 쉽지 안네요..
전환 부탁드립니다..
-------------------------------------------------------
var:피봇(0),저항1(0),저항2(0),지지1(0),지지2(0),
ilmok1(0), ilmok2(0), ilmok3(0), sunhang1(0), sunhang2(0),
emaV(0),중기(0),중장기(0),장기(0), MacdV(0), MacdS(0), MacdOsc(0),
LemaV(0), LmacdV(0), LmacdS(0), LmacdOsc(0),adxv(0),atrv(0),atrstop(0),cnt(0),posHigh(0), posLow(0);
피봇 = (DayHigh(1)+daylow(1)+dayclose(1))/3 ;
저항1 = 2 * 피봇 - daylow(1);
저항2 = 피봇 + DayHigh(1)-DayLow(1);
지지1 = 2 * 피봇 - DayHigh(1);
지지2 = 피봇 - DayHigh(1) + DayLow(1);
중기=ema(c,10);
중장기=ema(c,135);
장기=ema(c,880);
adxv=adx(10);
atrv=atr(10);
atrstop=iff(adxv>12 and adxv>adxv[1],atrv*1.2,atrv*3);
if stime>=090500 and CrossUp(c, 저항2) and 중기<저항2 then Buy("일번buy");
if stime>=092000 and sTime<=142000 and CrossUp (c, 지지1) then Buy("삼번buy");
var1 = Highest(h,BarsSinceEntry+1);
var2 = Lowest(L,BarsSinceEntry+1);
if IsEntryName("일번buy") Then
{ExitLong("일번atrEL", AtStop, Var1-ATRstop);
If c<ema(c,39) then ExitLong("일번2EL");
}
if IsEntryName("삼번buy") then {
ExitLong("삼번atrEL", AtStop, Var1-ATRstop);
If CrossDown(c,저항1) then ExitLong("삼번2EL");
}
ilmok1 = (highest(H,15)+lowest(L,15))/2;
ilmok2 = (highest(H,15*3)+lowest(L,15*3))/2;
ilmok3 = (highest(H,15*3*2)+lowest(L,15*3*2))/2;
sunhang1 = (ilmok1+ilmok2)/2 ;// "선행스팬1"
sunhang2 = ilmok3; // "선행스팬2"
if dayindex() == 23+1 then {
if accumN(iff( C > max(sunhang1, sunhang2),1,0),24) == 24 and c>장기 then buy("오번Buy");
}
if isEntryname("오번Buy") Then {
if CrossDown(C, max(sunhang1, sunhang2)) then ExitLong("오번el1");
}
if CrossUp(중기, 장기) then buy("칠번Buy");
if IsEntryName("칠번Buy") then {
ExitLong("칠번atrel", AtStop, Var1-ATRstop);}
#1 macd + ema
emaV = ema(C,250);
MacdV = macd(25,46);
MacdS = ema(MacdV,60);
MacdOsc = MacdV-MacdS;
#2 #1을 다시 변형
LemaV = ema(C,250*1.3);
LmacdV = macd(35*1.3,36*1.4);
LmacdS = ema(MacdV*1.3,70*1.2);
LmacdOsc = (LmacdV-LmacdS)*1.3;
If stime >=090500 and LemaV > LemaV[1] then {
if CrossUp(C, emaV) and (저항2 > 장기) Then
buy("구번buy");
}
if IsEntryName("구번buy") Then
{ExitLong("구번atrel", AtStop, Var1-ATRstop);
}
SetStopTrailing(60,1.5,PercentStop);
SetStopLoss(1,PointStop);
SetStopEndofday(144200);
답변 1
예스스탁 예스스탁 답변
2014-02-10 09:51:35
안녕하세요
예스스탁입니다.
참조데이터로 변경하시면 모든 신호를 봉완성시 발생으로 변경해야 합니다.
강제청산이나 진입청산의 atstop이나atlimit은 주종목만 대상으로 하게 되므로
봉완성시로만 작성가능합니다.
var:피봇(0,data2),저항1(0,data2),저항2(0,data2),지지1(0,data2),지지2(0,data2),
ilmok1(0,data2), ilmok2(0,data2), ilmok3(0,data2), sunhang1(0,data2), sunhang2(0,data2),
emaV(0,data2),중기(0,data2),중장기(0,data2),장기(0,data2), MacdV(0,data2), MacdS(0,data2), MacdOsc(0,data2),
LemaV(0,data2), LmacdV(0,data2), LmacdS(0,data2), LmacdOsc(0,data2),adxv(0,data2),
atrv(0,data2),atrstop(0,data2),cnt(0),posHigh(0), posLow(0),D2C(0,data1);
피봇 = data2((DayHigh(1)+daylow(1)+dayclose(1))/3);
저항1 = data2(2 * 피봇 - daylow(1));
저항2 = data2(피봇 + DayHigh(1)-DayLow(1));
지지1 = data2(2 * 피봇 - DayHigh(1));
지지2 = data2(피봇 - DayHigh(1) + DayLow(1));
중기 = data2(ema(c,10));
중장기 = data2(ema(c,135));
장기 = data2(ema(c,880));
adxv = data2(adx(10));
atrv = data2(atr(10));
atrstop = data2(iff(adxv>12 and adxv>adxv[1],atrv*1.2,atrv*3));
ilmok1 = data2((highest(H,15)+lowest(L,15))/2);
ilmok2 = data2((highest(H,15*3)+lowest(L,15*3))/2);
ilmok3 = data2((highest(H,15*3*2)+lowest(L,15*3*2))/2);
sunhang1 = data2((ilmok1+ilmok2)/2);// "선행스팬1"
sunhang2 = data2(ilmok3); // "선행스팬2"
#1 macd + ema
emaV = data2(ema(C,250));
MacdV = data2(macd(25,46));
MacdS = data2(ema(MacdV,60));
MacdOsc = data2(MacdV-MacdS);
#2 #1을 다시 변형
LemaV = data2(ema(C,250*1.3));
LmacdV = data2(macd(35*1.3,36*1.4));
LmacdS = data2(ema(MacdV*1.3,70*1.2));
LmacdOsc = data2((LmacdV-LmacdS)*1.3);
if data2(stime>=090500 and CrossUp(c, 저항2) and 중기<저항2) then Buy("일번buy");
if data2(stime>=092000 and sTime<=142000 and CrossUp (c, 지지1)) then Buy("삼번buy");
if MarketPosition == 1 and IsEntryName("일번buy") Then
{
if BarsSinceEntry >= 2 and data2(L) <= Highest(data2(c),BarsSinceEntry+1)[1]-ATRstop[1] Then
ExitLong("일번atrEL");
If data2(c<ema(c,39)) then
ExitLong("일번2EL");
}
if IsEntryName("삼번buy") then {
if BarsSinceEntry >= 2 and data2(L) <= Highest(data2(c),BarsSinceEntry+1)[1]-ATRstop[1] Then
ExitLong("삼번atrEL");
If data2(CrossDown(c,저항1)) then
ExitLong("삼번2EL");
}
if data2(dayindex() == 23+1) then {
if data2(accumN(iff(C > max(sunhang1, sunhang2),1,0),24) == 24 and c>장기) then
buy("오번Buy");
}
if MarketPosition == 1 and isEntryname("오번Buy") Then {
if data2(CrossDown(C, max(sunhang1, sunhang2))) then
ExitLong("오번el1");
}
if CrossUp(중기, 장기) then
buy("칠번Buy");
if MarketPosition == 1 and IsEntryName("칠번Buy") then {
if BarsSinceEntry >= 2 and data2(L) <= Highest(data2(c),BarsSinceEntry+1)[1]-ATRstop[1] Then
ExitLong("칠번atrel");
}
If data2(stime >=090500 and LemaV > LemaV[1]) then {
if data2(CrossUp(C, emaV) and (저항2 > 장기)) Then
buy("구번buy");
}
if MarketPosition == 1 and IsEntryName("구번buy") Then {
if BarsSinceEntry >= 2 and data2(L) <= Highest(data2(c),BarsSinceEntry+1)[1]-ATRstop[1] Then
ExitLong("구번atrel");
}
if MarketPosition == 1 Then{
if highest(data2(c),BarsSinceEntry) >= D2C[BarsSinceEntry]*1.015 And
L <= highest(data2(c),BarsSinceEntry)-(highest(data2(c),BarsSinceEntry)-D2C[BarsSinceEntry])*0.6 Then
ExitLong("tr");
if data2(L) <= D2C[BarsSinceEntry]-1 then
ExitLong("loss");
}
SetStopEndofday(144200);
즐거운 하루되세요
> 머니사이언스 님이 쓴 글입니다.
> 제목 : 변경바랍니다
> 안녕하세요..아래식을 data2로 참조해서 콜옵션을 메인으로 해서 거래하고자 하는데
전환하는게 쉽지 안네요..
전환 부탁드립니다..
-------------------------------------------------------
var:피봇(0),저항1(0),저항2(0),지지1(0),지지2(0),
ilmok1(0), ilmok2(0), ilmok3(0), sunhang1(0), sunhang2(0),
emaV(0),중기(0),중장기(0),장기(0), MacdV(0), MacdS(0), MacdOsc(0),
LemaV(0), LmacdV(0), LmacdS(0), LmacdOsc(0),adxv(0),atrv(0),atrstop(0),cnt(0),posHigh(0), posLow(0);
피봇 = (DayHigh(1)+daylow(1)+dayclose(1))/3 ;
저항1 = 2 * 피봇 - daylow(1);
저항2 = 피봇 + DayHigh(1)-DayLow(1);
지지1 = 2 * 피봇 - DayHigh(1);
지지2 = 피봇 - DayHigh(1) + DayLow(1);
중기=ema(c,10);
중장기=ema(c,135);
장기=ema(c,880);
adxv=adx(10);
atrv=atr(10);
atrstop=iff(adxv>12 and adxv>adxv[1],atrv*1.2,atrv*3);
if stime>=090500 and CrossUp(c, 저항2) and 중기<저항2 then Buy("일번buy");
if stime>=092000 and sTime<=142000 and CrossUp (c, 지지1) then Buy("삼번buy");
var1 = Highest(h,BarsSinceEntry+1);
var2 = Lowest(L,BarsSinceEntry+1);
if IsEntryName("일번buy") Then
{ExitLong("일번atrEL", AtStop, Var1-ATRstop);
If c<ema(c,39) then ExitLong("일번2EL");
}
if IsEntryName("삼번buy") then {
ExitLong("삼번atrEL", AtStop, Var1-ATRstop);
If CrossDown(c,저항1) then ExitLong("삼번2EL");
}
ilmok1 = (highest(H,15)+lowest(L,15))/2;
ilmok2 = (highest(H,15*3)+lowest(L,15*3))/2;
ilmok3 = (highest(H,15*3*2)+lowest(L,15*3*2))/2;
sunhang1 = (ilmok1+ilmok2)/2 ;// "선행스팬1"
sunhang2 = ilmok3; // "선행스팬2"
if dayindex() == 23+1 then {
if accumN(iff( C > max(sunhang1, sunhang2),1,0),24) == 24 and c>장기 then buy("오번Buy");
}
if isEntryname("오번Buy") Then {
if CrossDown(C, max(sunhang1, sunhang2)) then ExitLong("오번el1");
}
if CrossUp(중기, 장기) then buy("칠번Buy");
if IsEntryName("칠번Buy") then {
ExitLong("칠번atrel", AtStop, Var1-ATRstop);}
#1 macd + ema
emaV = ema(C,250);
MacdV = macd(25,46);
MacdS = ema(MacdV,60);
MacdOsc = MacdV-MacdS;
#2 #1을 다시 변형
LemaV = ema(C,250*1.3);
LmacdV = macd(35*1.3,36*1.4);
LmacdS = ema(MacdV*1.3,70*1.2);
LmacdOsc = (LmacdV-LmacdS)*1.3;
If stime >=090500 and LemaV > LemaV[1] then {
if CrossUp(C, emaV) and (저항2 > 장기) Then
buy("구번buy");
}
if IsEntryName("구번buy") Then
{ExitLong("구번atrel", AtStop, Var1-ATRstop);
}
SetStopTrailing(60,1.5,PercentStop);
SetStopLoss(1,PointStop);
SetStopEndofday(144200);
다음글
이전글