커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

수식 부탁 드립니다. 감사합니다.

수식 부탁 드립니다. 매수식: 진입: 5이평 20이평이 정배열일 경우에, 가격이 현재 가격보다 40틱(변수로 처리 = 변수명 V1) 넘게 하락한 후, 그 후의 최저점에서 20틱(변수로 처리 = 변수명 V2) 상승하면 매수. 청산: 진입 가격 이후 최고 가격에서 12틱(변수로 처리 = 변수명 V3) 하락하면 매도로 청산 (추적 스탑임) 매도식: 위의 역논리로 작성 (변수명은 V1, V2, V3를 그대로 사용) 감사합니다.
프로필 이미지
즐겁게
2024-09-26
633
글번호 183787
시스템

타요 님에 의해서 삭제되었습니다.

프로필 이미지
타요
2024-09-26
45
글번호 183786
종목검색
답변완료

오류

안녕하세요 시그널메이커에서는 대부분 구현이 제대로 되지않아서 예스이용해보려고합니다. 사용자함수 입력하려고합니다 근데 오류가 나옵니다 수정좀 부탁드립니다 Inputs: ATRLength(NumericSimple), ATRMult(NumericSimple), Strength(NumericSimple), STrend(NumericRef); Vars: vATR(0), vAvg(0), DN(0), UP(0), Trend(1), flag(0), flagh(0), ST(0), hl(0); hl = Highest(High, ATRLength) - Lowest(Low, ATRLength); vATR = Ema(hl, ATRLength); vAvg = ( Ema(High, Strength) + Ema(Low, Strength) ) / 2; UP = vAvg + vATR; DN = vAvg - vATR; If C > UP[1] And C > Highest(High, Strength)[1] Then Trend = 1 Else If C < DN[1] And C < Lowest(Low, Strength)[1] Then Trend = -1; If Trend < 0 And Trend[1] > 0 Then flag = 1 Else flag = 0; If Trend > 0 And Trend[1] < 0 Then flagh = 1 Else flagh = 0; If Trend > 0 And DN < DN[1] Then DN = DN[1]; If Trend < 0 And UP > UP[1] Then UP = UP[1]; If flag = 1 Then UP = vAvg + vATR; If flagh = 1 Then DN = vAvg - vATR; If Trend = 1 Then ST = DN Else ST = UP; SuperTrend = ST; STrend = Trend; 이 사용자 함수를 만든뒤 아래 자동매매만들고싶습니다 // Inputs inputs: ATRLength1(14), ATRMult1(3), Strength1(20); // Variables vars: strend1(0), st1(0); // Calculate SuperTrend st1 = SuperTrend(ATRLength1, ATRMult1, Strength1, strend1); // Trading Logic // Buy when the close price crosses above the SuperTrend If CrossUp(C, st1) Then Buy("매수"); // Sell when the close price crosses below the SuperTrend If CrossDown(C, st1) Then Sell("매도"); 자동매매로 전환하고싶습니다
프로필 이미지
몽탄
2024-09-26
539
글번호 183785
사용자 함수

와우리 님에 의해서 삭제되었습니다.

프로필 이미지
와우리
2024-09-26
329
글번호 183784
지표
답변완료

수식 수정 부탁드립니다.

안녕하세요. 아래의 피라미딩전략에 다소 오류가 있는듯하여 수정 요청드립니다. 감사합니다. 1. 손실시에는 다음 진입신호가 나올때까지 보유하며, 총 5회까지 진입허용 2. 각각의 진입은 수익시에만 트레일링스탑으로 청산 if MarketPosition == 0 Then { if CurrentEntries == 0 Then { if BuyCond == True Then Buy("Long1", AtMarket); } } if MarketPosition == 1 Then { if CurrentEntries == 1 Then { if BuyCond == True Then Buy("Long2", AtMarket); if PositionProfit(0) > 0 Then ExitLong("TStop1-0", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long1"); } if CurrentEntries == 2 Then { if BuyCond == True Then Buy("Long3", AtMarket); if PositionProfit(0) > 0 Then ExitLong("TStop2-0", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long2"); if PositionProfit(1) > 0 Then ExitLong("TStop2-1", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long1"); } if CurrentEntries == 3 Then { if BuyCond == True Then Buy("Long4", AtMarket); if PositionProfit(0) > 0 Then ExitLong("TStop3-0", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long3"); if PositionProfit(1) > 0 Then ExitLong("TStop3-1", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long2"); if PositionProfit(2) > 0 Then ExitLong("TStop3-2", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long1"); } if CurrentEntries == 4 Then { if BuyCond == True Then Buy("Long5", AtMarket); if PositionProfit(0) > 0 Then ExitLong("TStop4-0", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long4"); if PositionProfit(1) > 0 Then ExitLong("TStop4-1", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long3"); if PositionProfit(2) > 0 Then ExitLong("TStop4-2", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long2"); if PositionProfit(3) > 0 Then ExitLong("TStop4-3", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long1"); } if CurrentEntries == 5 Then { if PositionProfit(0) > 0 Then ExitLong("TStop5-0", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long5"); if PositionProfit(1) > 0 Then ExitLong("TStop5-1", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long4"); if PositionProfit(2) > 0 Then ExitLong("TStop5-2", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long3"); if PositionProfit(3) > 0 Then ExitLong("TStop5-3", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long2"); if PositionProfit(4) > 0 Then ExitLong("TStop5-4", Atstop, highest(high,barsSinceEntry+1) - ATR, "Long1"); } }
프로필 이미지
착한이
2024-09-26
671
글번호 183780
시스템
답변완료

수식 하나 부탁드립니다.

안녕하세요 09 시 10분에 매수 09 시 20분에 매도 09 시 30분에 매수 09 시 40분에 매도 하는 수식을 부탁드립니다. 항상 감사드립니다.
프로필 이미지
뭐이런걸다
2024-09-26
691
글번호 183779
시스템
답변완료

문의 드립니다

안녕하세요 키움지표 전환 부탁드립니다 1. 수식1 TT=BBandsUp(20,2); ValueWhen(1,TT >TT(1),TT) 수식2 TT=BBandsUp(14,1.1); ValueWhen(1,TT >TT(1),TT) 수식3 TT=BBandsUp(20,2); ValueWhen(1,TT < TT(1),TT) 수식4 TT=BBandsUp(14,1.1); ValueWhen(1,TT < TT(1),TT) 2. 수식1 TT=BBandsDown(20,2); ValueWhen(1,TT >TT(1),TT) 수식2 TT=BBandsDown(14,1.1); ValueWhen(1,TT >TT(1),TT) 수식3 TT=BBandsDown(20,2); ValueWhen(1,TT < TT(1),TT) 수식4 TT=BBandsDown(14,1.1); ValueWhen(1,TT < TT(1),TT) 3 수식1 highest(H, period, 1); 수식2 lowest(L, period, 1); 수식3 highest(C, period, 1); 수식4lowest(C, period, 1); 4 수식1 highest(H, period, 0); 수식2 lowest(L, period, 0); 수식3 highest(C, period, 0); 수식4lowest(C, period, 0); 3번고4번의 기간은 20으로하고 변경가능하게 부탁드립니다 5. 수식1(선1) ((highest(high,shortPeriod)+lowest(low,shortPeriod) +highest(high,midPeriod)+lowest(low,midPeriod))/4 +2*BBandsUp(Period,D1))/3 수식2(선2) ((highest(high,shortPeriod)+lowest(low,shortPeriod)+ (highest(high,longPeriod)+lowest(low,longPeriod)))/4 +2*BBandsUp(Period,D1))/3 수식3(선1) ((highest(high,shortPeriod)+lowest(low,shortPeriod)+highest(high,midPeriod)+lowest(low,midPeriod))/4 +2*BBandsDown(Period,D1))/3 수식4(선2) ((highest(high,shortPeriod)+lowest(low,shortPeriod) +(highest(high,longPeriod)+lowest(low,longPeriod)))/4 +2*BBandsDown(Period,D1))/3 지표조건은 5,15,30. d1은3,기간은 20 입니다 (변경가능) 감사합니다
프로필 이미지
만강
2024-09-26
759
글번호 183770
지표
답변완료

첫진입과 나머지 진입 전체거래횟수1

요청내용1) 아래 수식은 s1 진입이 주된 진입수식 입니다. s1 진입이 없을 경우 s2,s3,b1 중 어느 하나가 진입합니다. s1 진입이 있을 경우, 나머지는 진입하지 않는다는 조건을 추가해 주십시요. 요청 내용2) 거래는 데이트레이딩이며, 당일 발생봉부터 계산한다는 내용과 전체수식 통틀어 거래는 1번만 한다는 내용도 추가해 주십시요. 요청내용 3 손절 수식을 작성해 보았습니다. 맞는지 살펴주십시요. 항상 고맙습니다. **************************************************************************** input : d2(50),d3(800); input : dd2(4000); input : 몸통(0.65),몸통lock(090000); input : dd3(3000); input : s1ls(4.2),s1tr(5.2); input : s2ls(4.2),s2tr(5.2); input : s3ls(4.2),s3tr(5.2); input : b1ls(1.8),b1tr(4.4); if Data2(c<highd(0)-d2) and Data3(c)<d3 then Sell("s1"); if Data2(c<opend(0)-dd2) Then Sell("s2"); if c<o and abs(o-c)>몸통 Then Sell("s3"); if Data3(c>lowd(0)+dd3) Then Buy("b1"); if MarketPosition== -1 Then { if IsEntryName("s1") == true Then { SetStopLoss(s1ls,PointStop); SetStopTrailing(s1tr,0,PointStop,1); } Else if IsEntryName("s2") == true Then { SetStopLoss(s2ls,PointStop); SetStopTrailing(s2tr,0,PointStop,1); } Else if IsEntryName("s3") == true Then { SetStopLoss(s3ls,PointStop); SetStopTrailing(s3tr,0,PointStop,1); } } else if MarketPosition== 1 Then { SetStopLoss(b1ls,PointStop); SetStopTrailing(b1tr,0,PointStop,1); } Else { SetStopLoss(0); SetStopProfittarget(0); }
프로필 이미지
목마와숙녀
2024-11-06
727
글번호 183767
시스템
답변완료

부탁드립니다

과거에 만들어 주신 수식입니다. //n이 0이면 당일시가, 1이면 전일종가, 2이면 차트첫봉시가기준 으로 되어 있습니다. 이렇게 이용하니, 전일의 그래프와 당일의 그래프가 겹쳐져서 당일아침에 왜곡이 많이 생깁니다. 그래서 날짜와 시간을 지정해서 그때부터 그래프가 그려지면 좋겠습니다.. 부탁드립니다. //n이 0이면 당일시가, 1이면 전일종가, 2이면 차트첫봉시가기준 //data1-콜, data2-풋, data3-선물 input : N(0),선비(0),옵비(0),P1(3),P2(5),P3(10); var : O1(0,data1),R1(0,data1),M21(0,data1),M22(0,data1),M23(0,data1); var : O2(0,data2),R2(0,data2);// var : O3(0,data3),R3(0,data3),M11(0,data3),M12(0,data3),M13(0,data3); var : sp(0); if N == 0 Then //시가기준 { O1 = data1(openD(0)); O2 = data2(openD(0)); O3 = data3(openD(0)); } if N == 1 Then { O1 = data1(closeD(1)); O2 = data2(closeD(1)); O3 = data3(closeD(1)); } if N == 2 then { if data1(index == 0) Then O1 = data1(O); if data2(index == 0) Then O2 = data2(O); if data3(index == 0) Then O3 = data3(O); } if O1 > 0 Then { R3 = data3((C-O3)/O3*선비); M11 = data3(ma(R1,P1)); M12 = data3(ma(R1,P2)); M13 = data3(ma(R1,P3)); plot1(R3,"d1 등락률"); plot2(M11,"d1 이평1"); plot3(M12,"d1 이평2"); plot4(M13,"d1 이평3"); } if O2 > 0 Then { R1 = data1((C-O1)/O1*옵비); M21 = data1(ma(R1,P1)); M22 = data1(ma(R1,P2)); M23 = data1(ma(R1,P3)); plot21(R1,"d2 등락률"); plot6(M21,"d2 이평3"); plot7(M22,"d2 이평3"); plot8(M23,"d2 이평3"); } if O3 > 0 Then { R2 = data2((C-O2)/O2*옵비)*-1; plot31(R2,"d3 등락률"); plot41(sp,"sp 등락률"); } if O1 > 2 and O3 > 0 Then { sp = r1-r2; Plot10(sp); }
프로필 이미지
파란별
2024-09-26
1074
글번호 183766
지표
답변완료

거래 종료(포지션 정리)관련 문의 드립니다.

항상 많은 도움 감사드립니다. 나스닥 시스템 거래를 24시간 동안 운용하고 있습니다. 그런데 나스닥 시장 자체가 현지 시간기준으로 3시 30분부터 휴식시간이 있으며 예스스탁 시스템은 또한 아침 7시경에 점검 때문에 시스템이 종료가 됩니다. 그래서 시스템은 24시간 돌아가되 현지 시간기준으로 3시 20분에 포지션이 있다면 정리하고 거래가 종료되도록 설정하고 싶습니다. 거래 시간으로 설정한다면 현지시간 오후 17:30분에 시작을 해서 다음날 오후 15시 20분에 정리가 되게 하고 싶습니다. SetStopEndofday 명령어를 사용해 보았는데 설정을 잘못하였는지 설정한 시간이후에는 거래가 이루어 지지 않는 현상이 발생해서 도움 요청 드립니다. 정리하자면 거래 시간은 17:30 ~ 다음날 15:20 15:20분에 모든 포지션을 정리한다... 입니다. 그리고 시스템이 돌아가는 중에 손실제한을 100으로 설정하는 법도 부탁드립니다. 손실 제한을 걸어보니 거래가 이루어 지지 않아서요...
프로필 이미지
비정성시
2024-09-26
800
글번호 183760
시스템