커뮤니티

문의 드립니다

프로필 이미지
푸른
2023-08-21 15:18:52
1065
글번호 171712
답변완료
1. Inputs: Length(10), ATRs(1.5), Pval(0.05); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If BuySetup Then Buy ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If sellSetup Then ExitLong ("KC_SE", AtStop, SellBase - Pval); 2. Inputs: Length(10), ATRs(1.5), Pval(0.05); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If buySetup Then ExitShort ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If SellSetup Then Sell ("KC_SE", AtStop, SellBase - Pval); ------------- 위 2가지 수식어에 추가하고자 합니다. 1번 수식어에 5,20 데드에서 손절 2번 수식어에 5,20 골든에서 손절
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2023-08-21 15:25:51

안녕하세요 예스스탁입니다. 1 Inputs: Length(10), ATRs(1.5), Pval(0.05),P1(5),P2(20); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); var : mav1(0),mav2(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); mav1 = ma(C,P1); mav2 = ma(C,P2); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If BuySetup Then Buy ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If sellSetup Then ExitLong ("KC_SE", AtStop, SellBase - Pval); if MarketPosition == 1 and CrossDown(mav1,mav2) Then ExitLong("bx"); 2 Inputs: Length(10), ATRs(1.5), Pval(0.05),P1(5),P2(20); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); var : mav1(0),mav2(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); mav1 = ma(C,P1); mav2 = ma(C,P2); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If buySetup Then ExitShort ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If SellSetup Then Sell ("KC_SE", AtStop, SellBase - Pval); if MarketPosition == -1 and CrossUp(mav1,mav2) Then ExitShort("sx"); 즐거운 하루되세요 > 푸른 님이 쓴 글입니다. > 제목 : 문의 드립니다 > 1. Inputs: Length(10), ATRs(1.5), Pval(0.05); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If BuySetup Then Buy ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If sellSetup Then ExitLong ("KC_SE", AtStop, SellBase - Pval); 2. Inputs: Length(10), ATRs(1.5), Pval(0.05); Variables: KUpper(0), BuySetup(False), BuyBase(0); Variables: KLower(0), SellSetup(False), SellBase(0); KUpper = KeltnerChannel(Close, Length, ATRs); KLower = KeltnerChannel(Close, Length, -ATRs); Condition1 = Crossup(Close, KUpper); Condition2 = CrossDown(Close, KLower); If MarketPosition() == 1 OR Close < MA(close, Length) Then BuySetup = False; Else If Condition1 Then Begin BuySetup = True; BuyBase = High; End; If MarketPosition() == -1 OR Close > MA(Close, Length) Then SellSetup = False; Else If Condition2 Then Begin SellSetup = True; SellBase = Low; End; //설명 : Keltner Channel Long Entry If buySetup Then ExitShort ("KC_LE", AtStop, BuyBase + Pval); //설명 : Keltner Channel Short Entry If SellSetup Then Sell ("KC_SE", AtStop, SellBase - Pval); ------------- 위 2가지 수식어에 추가하고자 합니다. 1번 수식어에 5,20 데드에서 손절 2번 수식어에 5,20 골든에서 손절