커뮤니티

문의드립니다..

프로필 이미지
머니사이언스
2014-07-26 14:26:54
178
글번호 77131
답변완료
안녕하세요..아래식을 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; setstopendofday(144200);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-07-28 14:04:25

안녕하세요 예스스탁입니다. 참조데이터 내용으로 변경하시면 atstop이나 atlimit으로 작성된 식은 봉완성으로 작성되어야 합니다. atstop과 atlimit은 주종목 시세와 가격을 비교하므로 참조데이터에서는 즉시 가능하지 않습니다. Inputs: Len(10), P(60), DiV(30), mult(5); vars: MP(0,data2), stopprice(0,data2), Move(0,data2); var : V1(0,data2),v2(0,data2); If data2(High - Low <> 0) then Move = data2(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 and data2(L <= stopprice) then begin exitlong ("ExitLong"); stopprice = stopprice +( low-stopprice )/Div; end; setstopendofday(144200); 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : 문의드립니다.. > 안녕하세요..아래식을 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; setstopendofday(144200);