커뮤니티

수식작성 부탁드립니다.

프로필 이미지
chlangs
2021-11-18 07:39:35
473
글번호 153685
답변완료
// 타 증권사 시스템 전략입니다. 예스트레이더로 전환 부탁드립니다.?? Params : Profit_Target( 20 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 30 ); // 손절 ( 단위 : 틱 ) param : BuyA_ShortLeng(5) // 단기 이동평균 , BuyA_LongLeng(20) // 장기 이동평균 , BuyA_SignalLeng(10) // SigSignal 기간 ; param : Exit_Len(10); var : BuyA_Price1(0), BuyA_Price2(0), BuyA_Result(FALSE), SellA_Result(False) ; var : Vol_check(False) ; var : C_high(0), C_low(0); if Volume > 100 Then vol_check = true Else vol_check = False ; C_high = Highest(Close, Exit_Len); C_low = Lowest(Close, Exit_Len); BuyA_Price1 = MACD(Close, BuyA_ShortLeng, BuyA_LongLeng); BuyA_Price2 = Sma(MACD(Close, BuyA_ShortLeng, BuyA_LongLeng), BuyA_SignalLeng); BuyA_Result = CrossUp(BuyA_Price1, BuyA_Price2); SellA_Result = CrossDown(BuyA_Price1 , BuyA_Price2); if ( BuyA_Result = true And BuyA_Price1 < 0 And vol_check = True ) Then Begin ExitShort("방향전환S") ; Buy("Buy",atmarket); End; if ( SellA_Result = true And BuyA_Price1 > 0 And vol_check = True ) Then Begin ExitLong("방향전환B") ; Sell("Sell",atmarket); End; if c < c_low[1] Then Begin ExitLong("오류진입_매수",atmarket ) ; End; if c > c_high[1] Then Begin ExitShort("오류진입_매도",atmarket) ; End; Var : TickSize( 0 ); TickSize = OneTick * PriceScale; // 호가 단위 SetStopProfitTarget( Profit_Target * TickSize ); SetStopLoss( Stop_Loss * TickSize ); //SetExitOnClose();
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-11-18 11:15:00

안녕하세요 예스스탁입니다. input : Profit_Target( 20 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 30 ); // 손절 ( 단위 : 틱 ) input : BuyA_ShortLeng(5) // 단기 이동평균 , BuyA_LongLeng(20) // 장기 이동평균 , BuyA_SignalLeng(10) // SigSignal 기간 ; input : Exit_Len(10); var : BuyA_Price1(0), BuyA_Price2(0), BuyA_Result(FALSE), SellA_Result(False) ; var : Vol_check(False) ; var : C_high(0), C_low(0); if Volume > 100 Then vol_check = true; Else vol_check = False; C_high = Highest(Close, Exit_Len); C_low = Lowest(Close, Exit_Len); BuyA_Price1 = MACD(BuyA_ShortLeng, BuyA_LongLeng); BuyA_Price2 = ma(MACD(BuyA_ShortLeng, BuyA_LongLeng), BuyA_SignalLeng); BuyA_Result = CrossUp(BuyA_Price1, BuyA_Price2); SellA_Result = CrossDown(BuyA_Price1 , BuyA_Price2); if ( BuyA_Result == true And BuyA_Price1 < 0 And vol_check == True ) Then { ExitShort("방향전환S") ; Buy("Buy",atmarket); } if ( SellA_Result == true And BuyA_Price1 > 0 And vol_check == True ) Then { ExitLong("방향전환B") ; Sell("Sell",atmarket); } if MarketPosition == 1 and c < c_low[1] Then { ExitLong("오류진입_매수",atmarket ) ; } if MarketPosition == -1 and c > c_high[1] Then { ExitShort("오류진입_매도",atmarket) ; } SetStopProfitTarget( Profit_Target * PriceScale,PointStop ); SetStopLoss( Stop_Loss * PriceScale, PointStop ); //SetStopEndofday(152000); 즐거운 하루되세요 > chlangs 님이 쓴 글입니다. > 제목 : 수식작성 부탁드립니다. > // 타 증권사 시스템 전략입니다. 예스트레이더로 전환 부탁드립니다.?? Params : Profit_Target( 20 ), // 익절 ( 단위 : 틱 ) Stop_Loss( 30 ); // 손절 ( 단위 : 틱 ) param : BuyA_ShortLeng(5) // 단기 이동평균 , BuyA_LongLeng(20) // 장기 이동평균 , BuyA_SignalLeng(10) // SigSignal 기간 ; param : Exit_Len(10); var : BuyA_Price1(0), BuyA_Price2(0), BuyA_Result(FALSE), SellA_Result(False) ; var : Vol_check(False) ; var : C_high(0), C_low(0); if Volume > 100 Then vol_check = true Else vol_check = False ; C_high = Highest(Close, Exit_Len); C_low = Lowest(Close, Exit_Len); BuyA_Price1 = MACD(Close, BuyA_ShortLeng, BuyA_LongLeng); BuyA_Price2 = Sma(MACD(Close, BuyA_ShortLeng, BuyA_LongLeng), BuyA_SignalLeng); BuyA_Result = CrossUp(BuyA_Price1, BuyA_Price2); SellA_Result = CrossDown(BuyA_Price1 , BuyA_Price2); if ( BuyA_Result = true And BuyA_Price1 < 0 And vol_check = True ) Then Begin ExitShort("방향전환S") ; Buy("Buy",atmarket); End; if ( SellA_Result = true And BuyA_Price1 > 0 And vol_check = True ) Then Begin ExitLong("방향전환B") ; Sell("Sell",atmarket); End; if c < c_low[1] Then Begin ExitLong("오류진입_매수",atmarket ) ; End; if c > c_high[1] Then Begin ExitShort("오류진입_매도",atmarket) ; End; Var : TickSize( 0 ); TickSize = OneTick * PriceScale; // 호가 단위 SetStopProfitTarget( Profit_Target * TickSize ); SetStopLoss( Stop_Loss * TickSize ); //SetExitOnClose();