커뮤니티

수식수정

프로필 이미지
아트정
2025-05-28 07:46:18
167
글번호 191234
답변완료
안녕하세요 아래수식에서 당일 시가선을 전일종가나 전일 정산가 기준으로 변경해 주세요 input : Period(20),dv(2); var : BBup(0),BBmd(0),BBdn(0),T(0); BBup = BollBandUp(Period,dv); BBmd = ma(c,Period); BBdn = BollBandDown(Period,dv); if CrossUp(c,bbup) Then T = 3; if CrossDown(c,bbup) Then T = -3; if CrossUp(c,bbmd) Then T = 2; if CrossDown(c,bbmd) Then T = -2; if CrossUp(c,bbdn) Then T = 1; if CrossDown(c,bbdn) Then T = -1; if C <= DayOpen-PriceScale*100 and T != T[1] and T == 2 and T[1] == 1 Then Buy(); if MarketPosition == 1 and T != T[1] and T == -1 Then ExitLong(); if C >= DayOpen+PriceScale*100 and T != T[1] and T == 3 and T[1] == -3 Then Sell(); if MarketPosition == 1 and CrossUp(C,bbmd) Then ExitShort(
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-05-28 11:06:22

안녕하세요 예스스탁입니다. 전일종가로 변경해 드립니다. input : Period(20),dv(2); var : BBup(0),BBmd(0),BBdn(0),T(0); BBup = BollBandUp(Period,dv); BBmd = ma(c,Period); BBdn = BollBandDown(Period,dv); if CrossUp(c,bbup) Then T = 3; if CrossDown(c,bbup) Then T = -3; if CrossUp(c,bbmd) Then T = 2; if CrossDown(c,bbmd) Then T = -2; if CrossUp(c,bbdn) Then T = 1; if CrossDown(c,bbdn) Then T = -1; if C <= DayClose(1)-PriceScale*100 and T != T[1] and T == 2 and T[1] == 1 Then Buy(); if MarketPosition == 1 and T != T[1] and T == -1 Then ExitLong(); if C >= DayClose(1)+PriceScale*100 and T != T[1] and T == 3 and T[1] == -3 Then Sell(); if MarketPosition == 1 and CrossUp(C,bbmd) Then ExitShort(); 즐거운 하루되세요 > 아트정 님이 쓴 글입니다. > 제목 : 수식수정 > 안녕하세요 아래수식에서 당일 시가선을 전일종가나 전일 정산가 기준으로 변경해 주세요 input : Period(20),dv(2); var : BBup(0),BBmd(0),BBdn(0),T(0); BBup = BollBandUp(Period,dv); BBmd = ma(c,Period); BBdn = BollBandDown(Period,dv); if CrossUp(c,bbup) Then T = 3; if CrossDown(c,bbup) Then T = -3; if CrossUp(c,bbmd) Then T = 2; if CrossDown(c,bbmd) Then T = -2; if CrossUp(c,bbdn) Then T = 1; if CrossDown(c,bbdn) Then T = -1; if C <= DayOpen-PriceScale*100 and T != T[1] and T == 2 and T[1] == 1 Then Buy(); if MarketPosition == 1 and T != T[1] and T == -1 Then ExitLong(); if C >= DayOpen+PriceScale*100 and T != T[1] and T == 3 and T[1] == -3 Then Sell(); if MarketPosition == 1 and CrossUp(C,bbmd) Then ExitShort(