커뮤니티
문의드려요
2014-08-26 09:32:45
132
글번호 78056
안녕하세요..아래식을 data2(선물기준)로 참조해서 콜옵션을 메인으로 해서 거래하고자
하는데 전환하는게 쉽지 안네요..
전환 부탁드립니다..
Inputs: Len(10), P(60), DiV(30), mult(5);
vars: MP(0), stopprice(0), Move(0);
If High - Low <> 0 then
Move = ema( (C - O) / (H - L) * V, len);
If Low < lowest( low, P )[1] and Move > highest( Move, P)[1] then
Buy("B2",onclose, def,1);
If Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1 then {
var1= h;
var2 = index;
}
if index - var2 < 2 then {
if CrossUp(C, var1) and C > dayOpen then buy("B1");
}
mp = marketposition;
if MP == 1 and MP[1] <> 1 then Begin
StopPrice = low - ma(range,4)*mult;
end;
If MP == 1 then begin
exitlong ("ExitLong", atstop,stopprice );
stopprice = stopprice +( low-stopprice )/Div;
end;
SetStopLoss(1,PointStop);
setstopendofday(144500);
답변 1
예스스탁 예스스탁 답변
2014-08-26 11:41:20
안녕하세요
예스스탁입니다.
참조데이터를 이용해 주종목에 신호를 발생하는 식으로 변경하시면 아래와 같습니다.
다만 참조데이터로 신호를 변경하면 모두 봉완성시로만 신호를 발생하게 작성할 수만 있습니다.
Inputs: Len(10), P(60), DiV(30), mult(5);
vars : MP(0,data2), stopprice(0,data2), Move(0,data2);
vars : V1(0,data2), V2(0,data2),D2C(0,data1);
D2C = data2(C);
If data2(High - Low) <> 0 then
Move = ema( (C - O) / (H - L) * V, len);
If data2(Low < lowest( low, P )[1] and Move > highest( Move, P)[1]) then
Buy("B2",onclose, def,1);
If data2(Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1) then {
v1 = data2(h);
v2 = data2(index);
}
if data2(index - v2 < 2) then {
if data2(CrossUp(C, v1) and C > OpenD(0)) then buy("B1");
}
mp = marketposition;
if MP == 1 and MP[1] <> 1 then Begin
StopPrice = data2(low - ma(range,4)*mult);
end;
If MP == 1 then begin
if data2(L <= StopPrice[1]) Then{
exitlong("ExitLong");
}
stopprice = data2(stopprice +( low-stopprice )/Div);
end;
if MarketPosition == 1 and data2(L)<= D2C[BarsSinceEntry] Then
ExitLong();
setstopendofday(144500);
즐거운 하루되세요
> 머니사이언스 님이 쓴 글입니다.
> 제목 : 문의드려요
> 안녕하세요..아래식을 data2(선물기준)로 참조해서 콜옵션을 메인으로 해서 거래하고자
하는데 전환하는게 쉽지 안네요..
전환 부탁드립니다..
Inputs: Len(10), P(60), DiV(30), mult(5);
vars: MP(0), stopprice(0), Move(0);
If High - Low <> 0 then
Move = ema( (C - O) / (H - L) * V, len);
If Low < lowest( low, P )[1] and Move > highest( Move, P)[1] then
Buy("B2",onclose, def,1);
If Low < Lowest( Low , P )[1] and MRO(Move < lowest( Move , P )[1],20,1) == -1 then {
var1= h;
var2 = index;
}
if index - var2 < 2 then {
if CrossUp(C, var1) and C > dayOpen then buy("B1");
}
mp = marketposition;
if MP == 1 and MP[1] <> 1 then Begin
StopPrice = low - ma(range,4)*mult;
end;
If MP == 1 then begin
exitlong ("ExitLong", atstop,stopprice );
stopprice = stopprice +( low-stopprice )/Div;
end;
SetStopLoss(1,PointStop);
setstopendofday(144500);
다음글
이전글