커뮤니티

문의드립니다. 예스 랭귀지화

프로필 이미지
고르면상한가
2020-04-24 11:25:44
1013
글번호 138274
답변완료
Var : Sp(0), TickSize( 0 ); TickSize = OneTick * PriceScale; // 호가 단위 SP = SignalPosition; If CrossUp(C, V1) Then Buy("매수", DEF, DEF, 2); If CrossDown(C, V2) Then Sell("매도", DEF, DEF, 2); If CurrContracts = 2 Then Begin If SP = 1 Then ExitLong("1차매수익절", atlimit, EntryPrice + (35 * TickSize), "매수", 1); If SP = -1 Then ExitShort("1차매도익절", Atlimit, entryPrice - (35 * TIckSIze), "매도", 1); End; If CurrContracts = 1 Then SetStopTrailing(32 * TickSIze * CurrContracts, 35* TIckSize * CurrContracts) Else SetStopTrailing(0, 0); // 익절 과 손절 설정 영역 Params : Profit_Target( 0 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 247 ); // 손절 ( 단위 : 틱 ) SetStopProfitTarget( Profit_Target * TickSize ); SetStopLoss( Stop_Loss * TickSize ); 예스랭귀지로 변경부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-04-23 17:45:55

안녕하세요 예스스탁입니다. Var : Sp(0),TickSize( 0 ),v1(0),v2(0); TickSize = PriceScale; SP = MarketPosition; If CrossUp(C, V1) Then Buy("매수", DEF, DEF, 2); If CrossDown(C, V2) Then Sell("매도", DEF, DEF, 2); If CurrentContracts == 2 Then Begin If SP == 1 Then ExitLong("1차매수익절", atlimit, EntryPrice + (35 * TickSize), "매수",1,1); If SP == -1 Then ExitShort("1차매도익절", Atlimit, entryPrice - (35 * TIckSIze), "매도",1,1); End; If CurrentContracts == 1 Then SetStopTrailing(32 * TickSIze * CurrentContracts, 35* TIckSize * CurrentContracts,PointStop); Else SetStopTrailing(0, 0); // 익절 과 손절 설정 영역 input :Profit_Target( 0 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 247 ); // 손절 ( 단위 : 틱 ) SetStopProfitTarget( Profit_Target * TickSize,PointStop ); SetStopLoss( Stop_Loss * TickSize,PointStop ); 즐거운 하루되세요 > 고르면상한가 님이 쓴 글입니다. > 제목 : 문의드립니다. 예스 랭귀지화 > 현재 시그널 메이커에서 테스트해보고 있는 전략중 예스스탁에서 사용시 아래 부분중 문제가 되는 부분이 있다면 수정부탁드립니다. (V1,V2)에 대한 정의는 포함하지 않았습니다. Var : Sp(0), TickSize( 0 ); TickSize = OneTick * PriceScale; // 호가 단위 SP = SignalPosition; If CrossUp(C, V1) Then Buy("매수", DEF, DEF, 2); If CrossDown(C, V2) Then Sell("매도", DEF, DEF, 2); If CurrContracts = 2 Then Begin If SP = 1 Then ExitLong("1차매수익절", atlimit, EntryPrice + (35 * TickSize), "매수", 1); If SP = -1 Then ExitShort("1차매도익절", Atlimit, entryPrice - (35 * TIckSIze), "매도", 1); End; If CurrContracts = 1 Then SetStopTrailing(32 * TickSIze * CurrContracts, 35* TIckSize * CurrContracts) Else SetStopTrailing(0, 0); // 익절 과 손절 설정 영역 Params : Profit_Target( 0 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 247 ); // 손절 ( 단위 : 틱 ) SetStopProfitTarget( Profit_Target * TickSize ); SetStopLoss( Stop_Loss * TickSize ); 예스랭귀지로 변경부탁드립니다.