커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내

안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
프로필 이미지
예스스탁
2026-02-27
4366
글번호 230811
지표
답변완료

문의 드립니다.

질문1) obv지표를 거래량 대신 거래대금으로 대체한 지표수식을 알고 싶습니다. 질문2) 위의 지표를 당일9시부터 시작하는 당일지표로 하여 장중 최대치와 최소치를 구하는 수식. 질문3) 위의 지표로 특정날짜를 기준으로 하여 금일의 장중까지의 최대누적치와 최소누적치를 구하는 수식 질문4) 차트창 아래쪽에 추가한 지표창이나 참조데이터창에 키움증권의 "신호검색"처럼 시스템수식이 아닌 그냥 매수나 매도의 화살표신호를 넣을 수 있는지, 아니면 그와 비슷한 효과를 낼 수 있는 방법이라도 있다면 좀 알려 주시기 바랍니다. 예스트레이더에 키움증권의 "신호검색"이나 "강세 약세"같은 방법을 사용할 수 있다면 훨씬 좋겠습니다.
프로필 이미지
이심전심
2018-04-01
325
글번호 117823
지표
답변완료

수식 문의드립니다.

지정 스탑에 대해서 문의 드립니다. 진입시... Buy("1", AtStop ); 으로 진입하였습니다. 특정 조건에서 40% 수익이 발생하면 청산하려고 아래와 같이 로직을 작성하였습니다. If M > 8 Then { SetStopProfittarget(40,PercentStop) ; } 그런데 해당 조건에서 SetStopProfittarget 이 발생하지 않습니다. 혹시 AtStop 과 SetStopProfittarget 이 안맞는걸까요? 아님 수식이 잘못 됐을까요... 목적은 atstop 으로 진입한 후, 40% 수익이 발생하면 청산하고자 합니다. 감사합니다. ㅜㅜ
프로필 이미지
이엘성투
2018-03-31
303
글번호 117822
지표
답변완료

수식작성 질문드립니다.

100일 고점에서 40% 떨어졌을 경우 첫 매수하고, 이후에 진입가격의 평균에서 10%씩 떨어질 때마다 계속 분할매수 한 후에, 진입가격 평균에서 20% 올랐을때 전량 청산을 하는 식을 만든다면 어떻게 만들어야 하나요?
프로필 이미지
쥬롱
2018-03-30
282
글번호 117821
시스템
답변완료

수식요청 드립이다.

안녕하세요. 연결선물 분봉 틱봉 오버형 피라미딩 스윙 시스템에서 1. 진입수식 매수진입 -> 상승 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우 피라미딩 누적 3차 매수진입 이후부터의 전량 청산은 직전 진입가에서 청산 (예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산) 2. 진입수식 매도진입 -> 하락 피라미딩 1차 2차 3차 4차 5차 까지 진입하는 경우 피라미딩 누적 3차 매도진입 이후부터의 전량 청산은 직전 진입가에서 청산 (예, 피라미딩 누적 3차 진입 -> 2차 진입가 청산 / 4차 진입 -> 3차 진입가 청산/ 5차 진입 -> 4차 진입가 청산) 피라미딩 진입 청산 수식요청 드립이다. 감사합니다. //------------------------------------------------------------------------------------------------------- #피라미딩진입수식 Input : i증감(0.5),진입수량(1),누적진입횟수(5); if MarketPosition == 1 and Bxcond == false and MaxEntries < 누적진입횟수 Then Buy("PBB",AtStop,LatestEntryPrice(0)+i증감,진입수량); if MarketPosition == -1 and SxCond == false and MaxEntries < 누적진입횟수 Then sell("PSS",AtStop,LatestEntryPrice(0)-i증감,진입수량); //------------------------------------------------------------------------------------------------------- #진입수식(예제) Input : Period(12), sigPeriod(9); value1 = TRIX(Period); value2 = ema(value1, sigPeriod); If CrossUP(value1, value2) Then{ Buy("BY"); } If CrossDown(value1, value2) Then{ Sell("SL"); } //-------------------------------------------------------------------------------------------------------
프로필 이미지
dandy
2018-03-30
304
글번호 117818
시스템
답변완료

문의드립니다.

도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 1. 코딩 변환 부탁드립니다. 쓰기금지어 업데이트는 다 한글로 바꿨습니다. 이거 그런데 일목균형표처럼 차트 오른쪽 란 좀 넓혀서 보게 만들 수 있나요? Function: TimeForecast inputs: PresentDate( NumericSimple ) , PresentTime( NumericSimple ) , DaysAhead( NumericSimple ) , HoursAhead( NumericSimple ) , MinutesAhead( NumericSimple ) , oFutureDate( NumericRef ) , oFutureTime( NumericRef ) ; variables: DateTime( 0 ) , FutureDateTime( 0 ) ; DateTime = DateToJulian( PresentDate ) + ( TimeToMinutes( PresentTime ) / 60 / 24 ) ; FutureDateTime = DateTime + DaysAhead + ( HoursAhead / 24 ) + ( MinutesAhead / 60 / 24 ) ; if DayOfWeekFromDateTime( FutureDateTime ) = Saturday then FutureDateTime = FutureDateTime - 1 else if DayOfWeekFromDateTime( FutureDateTime ) = Sunday then FutureDateTime = FutureDateTime + 1 ; oFutureDate = JulianToDate( IntPortion( FutureDateTime ) ) ; oFutureTime = MinutesToTime( FracPortion( FutureDateTime ) * 60 * 24 ) ; TimeForecast = FutureDateTime ; Function: FibTimeForecasts inputs: PivotValues[ MaxSize1, MaxSize2 ]( NumericArray ), { ZigZagPivots[Row1-6, 1] = price } { ZigZagPivots[Row1-6, 2] = date } FibDateTime[MaxSize3]( NumericArrayRef ) ; variables: Counter( 0 ), FirstCall( true ) ; arrays: FibNumbers[5]( 0 ), FibSwingRange[5]( 0 ) ; if FirstCall then begin FibNumbers[1] = 0.382 ; FibNumbers[2] = 0.5 ; FibNumbers[3] = 0.618 ; FibNumbers[4] = 0.707 ; FibNumbers[5] = 1 ; FirstCall = false ; end ; for Counter = 1 to 5 begin FibSwingRange[Counter] = PivotValues[ Counter + 1, 2 ] - PivotValues[ Counter, 2] ; { $f$9 through $f$13 } end ; for Counter = 1 to 5 begin FibDateTime[Counter] = FibNumbers[Counter] * FibSwingRange[5] + PivotValues[6, 2] ; end ; for Counter = 6 to 10 begin FibDateTime[Counter] = FibNumbers[ Counter - 5 ] * FibSwingRange[4] + PivotValues[6, 2] ; end ; for Counter = 11 to 15 begin FibDateTime[Counter] = FibNumbers[ Counter - 10 ] * FibSwingRange[2] + PivotValues[6, 2] ; end ; for Counter = 16 to 20 begin FibDateTime[Counter] = ( PivotValues[5, 2] - PivotValues[3, 2] ) * FibNumbers[ Counter - 15 ] + PivotValues[5, 2] ; end ; for Counter = 21 to 25 begin FibDateTime[Counter] = ( PivotValues[5, 2] - PivotValues[1, 2] ) * FibNumbers[ Counter - 20 ] + PivotValues[5, 2] ; end ; FibTimeForecasts = 1 ; Indicator: SqOf9_FibTimeComment { Square of Nine portions taken from: http://www.tradestationworld.com/discussions/Topic.aspx? TOPIC_ID=8289 Fibonacci time forecasts come directly from the TASC 1992 Robert Minor article, “A Spreadsheet for Time Ratio Analysis”. The commentary features were written by Mitch Shack of TradeStation Securities, Inc. Any misinterpretations of Fibonacci and Gann are my own. Mark Mills, TradeStation Securities, Inc. } inputs: YestDate( ELDate( 8, 10, 2004 ) ), TextPlaceTime( 1200 ), TextColor( White ), LineColor( Yellow ), LineStyle_1to5(1), ForecastWidth_0to6( 4 ), PriceForecastRange( 3 ), BaseNumber( 10 ), Price( Close ), RetracePct( 5 ), ZigZagLineWidth( 1 ), TextMinMoveOffset( -5 ) ; variables: xloop( 0 ), Counter( 0 ), ColumnEnd( 0 ), HighRange( 0 ), LowRange( 0 ), Degree( “” ), ID( -1 ), DaysAhead( 0 ), HoursAhead( 0 ), MinutesAhead( 0 ), oFutureDate( 0 ), oFutureTime( 0 ), ValueSpace( 8 ), ValueSpace2( 11 ), { Print spacing } ValueSpace3( 4 ), ValueSpace4( 13 ), ValueSpace5( 14 ), YesClose( 0 ), ZeroDegrees( 1 ), FortyFiveDegrees( 2 ), NinetyDegrees( 3 ), OneThirtyFiveDegrees( 4 ), OneEightyDegrees( 5 ), TwoTwentyFiveDegrees( 6 ), TwoSeventyDegrees( 7 ), ThreeFifteenDegrees( 8 ), { Array Index Positions } DegreeSections( 8 ), FullArrayCount( 49 ), MyBaseNumber( 0 ), NewSwingPrice( 0 ), SwingPrice( Price ), { used as a convenient 2-element array } SwingDate( Date ), { used as a convenient 2-element array } SwingTime( Time ), { used as a convenient 2-element array } TLDir( 0 ), { TLDir = -1 implies prev TL dn, +1 implies prev TL up } RetraceFctrUp( 1 + RetracePct * 0.01 ), RetraceFctrDn( 1 - RetracePct * 0.01 ), SaveSwing( false ), AddTL( false ), 업데이트TL( false ), TLRef( 0 ) ; arrays: ZigZagPivots[6, 2]( 0 ), { ZigZagPivots[Row1-6, 1] = price, ZigZagPivots[Row1-6, 2] = date } FibTimeTargets[25]( 0 ), DegreeOfAngle[8, 49]( 0 ), DegreeOfAngleWord[8]( “” ) ; if CurrentBar = 1 then begin MyBaseNumber = BaseNumber * 7 ; DegreeOfAngle[ ZeroDegrees, 0 ] = BaseNumber * 2 ; DegreeOfAngle[ FortyFiveDegrees, 0 ] = BaseNumber * 3 ; DegreeOfAngle[ NinetyDegrees, 0 ] = BaseNumber * 4 ; DegreeOfAngle[ OneThirtyFiveDegrees, 0 ] = BaseNumber * 5 ; DegreeOfAngle[ OneEightyDegrees, 0 ] = BaseNumber * 6 ; DegreeOfAngle[ TwoTwentyFiveDegrees, 0 ] = BaseNumber * 7 ; DegreeOfAngle[ TwoSeventyDegrees, 0 ] = BaseNumber * 8 ; DegreeOfAngle[ ThreeFifteenDegrees, 0 ] = BaseNumber * 9 ; Degree = “ deg” ; { the degree symbol number } DegreeOfAngleWord[ ZeroDegrees ] = “ - 0” + Degree ; DegreeOfAngleWord[ FortyFiveDegrees ] = “ - 45” + Degree ; DegreeOfAngleWord[ NinetyDegrees ] = “ - 90” + Degree ; DegreeOfAngleWord[ OneThirtyFiveDegrees ] = “ - 135” + Degree ; DegreeOfAngleWord[ OneEightyDegrees ] = “ - 180” + Degree ; DegreeOfAngleWord[ TwoTwentyFiveDegrees ] = “ - 225” + Degree ; DegreeOfAngleWord[ TwoSeventyDegrees ] = “ - 270” + Degree ; DegreeOfAngleWord[ ThreeFifteenDegrees ] = “ - 315” + Degree ; for xLoop = 1 to FullArrayCount begin DegreeOfAngle[ ZeroDegrees, xLoop ] = DegreeOfAngle[ ZeroDegrees, xloop - 1 ] + DegreeOfAngle[ ZeroDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ FortyFiveDegrees, xLoop ] = DegreeOfAngle[ FortyFiveDegrees, xloop - 1 ] + DegreeOfAngle[ FortyFiveDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ NinetyDegrees, xLoop ] = DegreeOfAngle[ NinetyDegrees, xloop - 1 ] + DegreeOfAngle[ NinetyDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ OneThirtyFiveDegrees, xLoop ] = DegreeOfAngle[ OneThirtyFiveDegrees, xloop - 1 ] + DegreeOfAngle[ OneThirtyFiveDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ OneEightyDegrees, xLoop ] = DegreeOfAngle[ OneEightyDegrees, xloop - 1 ] + DegreeOfAngle[ OneEightyDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ TwoTwentyFiveDegrees, xLoop ] = DegreeOfAngle[ TwoTwentyFiveDegrees, xloop - 1 ] + DegreeOfAngle[ TwoTwentyFiveDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ TwoSeventyDegrees, xLoop ] = DegreeOfAngle[ TwoSeventyDegrees, xloop - 1 ] + DegreeOfAngle[ TwoSeventyDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; DegreeOfAngle[ ThreeFifteenDegrees, xLoop ] = DegreeOfAngle[ ThreeFifteenDegrees, xloop - 1 ] + DegreeOfAngle[ ThreeFifteenDegrees, 0 ] + MyBaseNumber + ( 8 * ( xLoop - 1 ) ) ; end ; end ; { CurrentBar = 1 } if Date <> Date[1] then YesClose = Close[1] ; { if new day get the SO9 compare number } { ZigZag Calculations } { Candidate swings are just-confirmed, 3-bar (Str = 1), SwingHi’s and SwingLo’s } NewSwingPrice = SwingHigh( 1, Price, 1, 2 ) ; if NewSwingPrice <> -1 then begin if TLDir <= 0 and NewSwingPrice >= SwingPrice * RetraceFctrUp then { prepare to add new up TL } begin SaveSwing = true ; AddTL = true ; TLDir = 1 ; end else if TLDir = 1 and NewSwingPrice >= SwingPrice then { prepare to 업데이트 prev up TL } begin SaveSwing = true ; 업데이트TL = true ; end ; end else begin NewSwingPrice = SwingLow( 1, Price, 1, 2 ) ; if NewSwingPrice <> -1 then begin if TLDir >= 0 and NewSwingPrice <= SwingPrice * RetraceFctrDn then { prepare to add new dn TL } begin SaveSwing = true ; AddTL = true ; TLDir = -1 ; end else if TLDir = -1 and NewSwingPrice <= SwingPrice then { prepare to 업데이트 prev dn TL } begin SaveSwing = true ; 업데이트TL = true ; end ; end ; end ; if SaveSwing then { save new swing and reset SaveSwing } begin SwingPrice = NewSwingPrice ; SwingDate = Date[1] ; SwingTime = Time[1] ; SaveSwing = false ; end ; if AddTL then { add new TL and reset AddTL } begin Plot1( Close ) ; { marks the point at which a leg of pivot is locked down } { push the pivot date and time into the array } { ZigZagPivots[Row1 - 6, 1] = price, ZigZagPivots[Row1 - 6, 2] = date, row 1 is the oldest } for Value1 = 1 to 5 begin ZigZagPivots[ Value1, 2 ] = ZigZagPivots[ Value1 + 1, 2 ] ; end ; ZigZagPivots[6,2] = DateToJulian( SwingDate ) + TimeToMinutes( SwingTime ) / ( 24 * 60 ) ; for Value1 = 1 to 5 begin ZigZagPivots[ Value1, 1] = ZigZagPivots[ Value1 + 1, 1 ] ; end ; ZigZagPivots[6,1] = SwingPrice ; Value1 = FibTimeForecasts( ZigZagPivots, FibTimeTargets ) ; { back to the original ZigZag code } TLRef = TL_New( SwingDate, SwingTime, SwingPrice, SwingDate[1], SwingTime[1], SwingPrice[1] ) ; TL_SetExtLeft( TLRef, false ) ; TL_SetExtRight( TLRef, false ) ; TL_SetSize( TLRef, ZigZagLineWidth ) ; TL_SetColor( TLRef, LineColor ) ; AddTL = false ; end else if 업데이트TL then { 업데이트 prev TL and reset 업데이트TL } begin TL_SetEnd( TLRef, SwingDate, SwingTime, SwingPrice ) ; 업데이트TL = false ; end ; if AtCommentaryBar then begin xLoop = 0 ; ColumnEnd = 0 ; while xLoop < FullArrayCount and ColumnEnd = 0 begin xLoop = xLoop + 1 ; if DegreeOfAngle[ ZeroDegrees, xLoop ] > YesClose then ColumnEnd = xLoop ; { searching for SO9 numbers that are between YesClose } end ; LowRange = IntPortion( YesClose - PriceForecastRange ) ; HighRange = IntPortion( YesClose + PriceForecastRange ) ; for Counter = ColumnEnd - 1 to ColumnEnd begin for xLoop = 1 to DegreeSections begin if IFFLogic( DegreeOfAngle[ xLoop, Counter ] >= LowRange and DegreeOfAngle[ xLoop, Counter] <= HighRange, true, false ) then begin for Value99 = 1 to 25 begin MinutesAhead = ( IntPortion( FibTimeTargets[Value99] - ( DateToJulian ( date ) + ( TimeToMinutes( Time ) / ( 60 * 24 ) ) ) ) ) * ( 60 * 24 ) ; Value1 = TimeForecast( Date, Time, 0, 0, MinutesAhead, oFutureDate, oFutureTime ) ; Value1 = TL_New( oFutureDate, oFutureTime, DegreeOfAngle[ xLoop, Counter ], oFutureDate, oFutureTime, DegreeOfAngle[ xLoop, Counter ] - MinMove / PriceScale ) ; TL_SetStyle(Value1,LineStyle_1to5); TL_SetSize( Value1, ForecastWidth_0to6 ) ; ID = Text_New( Date, TextPlaceTime, DegreeOfAngle[ xLoop, Counter ] + TextMinMoveOffset * MinMove / PriceScale, NumToStr( DegreeOfAngle[ xLoop, Counter ], 0 ) + DegreeOfAngleWord[xLoop] ) ; Value1 = Text_SetColor( ID, TextColor ) ; end ; { FibTimeTargets loop } end ; { IFFLogic } end ; { xLoop } end ; { Counter } end ; { Date = }
프로필 이미지
잡다백수
2018-03-30
535
글번호 117817
시스템
답변완료

진입가격 제한

아래 수식에 대해 진입가격 제한 수식을 추가해주시고 input에 반영해주십시요 input : 최대(320), 최소(300) - 진입시 320 초과 진입중지 - 진입시 300 미만 진입중지 고맙습니다. **************************************************************** input : b1(11),b2(13),X1(13),X2(13),진입시간(090000); var : T1(0),entry(0),HH(0),EL(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition == 0 and entry == 0 and stime >= 진입시간 and C <= DayHigh-PriceScale*b1 and C[1] > DayHigh-PriceScale*b1 Then buy("b1"); if MarketPosition == -1 Then{ if CurrentContracts > CurrentContracts[1] Then EL = L; if L < EL Then EL = L; if entry == 1 and MarketPosition == -1 and C >= EL+PriceScale*X1 Then ExitLong("bx1"); } if TotalTrades > TotalTrades[1] Then HH = H; if H > HH Then HH = H; if MarketPosition == 0 and entry == 1 and stime >= 진입시간 and C <= HH-PriceScale*b2 and C[1] > HH-PriceScale*b2 Then buy("b2"); if MarketPosition== -1 and entry == 2 Then ExitShort("bx2",AtStop,EntryPrice+PriceScale*X2);
프로필 이미지
좌오비우오비
2018-03-30
314
글번호 117814
시스템
답변완료

문의드립니다.

20이평선을 종가가 crossup 하면 일단 매수준비상태로 들어가고 이전의 음봉시가를 0으로 초기화합니다. 매수준비상태에서 제일 최근의 음봉이 나오면 그 음봉의 시가를 기억해 두었다가 종가가 기억된 그 음봉의 시가를 crossup 돌파할 때 매수가 일어나도록 부탁드립니다. 기억된 음봉의 시가는 새로 음봉이 발생하면 또 새로운 음봉의 시가로 계속 바뀌어 저장 하도록 합니다. 반대로 20이평선을 종가가 crossdown하면 일단 매도준비상태로 들어가고 이전의 양봉시가를 아주 큰값 999999 으로 초기화합니다. 매도준비상태에서 제일 최근의 양봉이 나오면 그 양봉의 시가를 기억해 두었다가 종가가 기억된 그 양봉의 시가를 crossdown으로 돌파할 때 매도가 일어나도록 부탁드립니다. 기억된 양봉의 시가는 새로 양봉이 발생하면 또 새로운 양봉의 시가로 계속 바뀌어 저장 하도록 합니다. 추적청산으로 매수 또는 매도가 일어나서 20틱이상 수익이 발생하면 최고수익의 절반이하로 수익이 떨어질 때 청산되는 것으로 설계합니다. 추적청산이 되면 모든변수들을 초기화 합니다. 추적청산후에도 위와같은 방법으로 다시 실행하도록 부탁드리며 추적청산전에 매수매도 신호가 발생하면 청산과 동시에 반대신호로 매수매도가 들어가도록 하고 싶습니다.
프로필 이미지
종호
2018-03-30
291
글번호 117811
시스템
답변완료

손절한 가격대에 줄을 긋고싶은데 방법을 모르겠어요

setstoploss(20,percentstop); if setstoploss(20,percentstop) then value5=c; TL1 = tl_new(~~~~) 이렇게 하려니까 끝자리 데이터가 하나 더 필요한데 다른방법으로 긋는건 없을까요? 수평선만 그으면 되는데 잘 모르겠어요
프로필 이미지
amxy
2018-03-30
285
글번호 117807
시스템
답변완료

수식추가

아래 sell 수식에다 입력시간부터 장시작으로 인식하는 시간조절 input 수식을 추가했는데 시간조절에 따른 시뮬레이션 결과가 나오지 않습니다. 수정바랍니다. input : Price(305), 당일최대진입횟수(1),진입시간(100000); var : T1(0),entry(0),Tcond(false); if bdate != bdate[1] Then Tcond = false; if (sdate != sdate[1] and stime >= 진입시간) or (sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then Tcond = true; T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if entry < 당일최대진입횟수 and MarketPosition == 0 then{ if NextBarOpen >= Price Then sell("s1",AtStop,Price); Else sell("s2",Atlimit,Price); } ***************************************************************** input : Price(305), 당일최대진입횟수(1); var : T1(0),entry(0); if bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if entry < 당일최대진입횟수 and MarketPosition == 0 then{ if NextBarOpen >= Price Then sell("s1",AtStop,Price); Else sell("s2",Atlimit,Price); }
프로필 이미지
목마와숙녀
2018-03-30
299
글번호 117806
시스템