커뮤니티

문의드립니다

프로필 이미지
cjfdk
2022-08-25 18:20:13
1395
글번호 161751
답변완료
1. Inputs: Length(9), StdDev(2), Bars(2); Variables: BBTop(0),BBBot(0); BBTop = BollBandup(Length, StdDev); BBBot = BollBanddown(Length, StdDev); If CountIF(Close < BBBot, Bars) == Bars Then Buy("BBtop", AtStop, BBBot); If CountIF(Close > BBTop, Bars) == Bars Then Sell("BBbot", AtStop, BBTop); 2. Input : Period(14), LPercent(30), SPercent(70); Var : value(0); value = RSI(Period); # 매수/매도청산 If CrossUP(value, LPercent) Then { Buy(); } # 매도/매수청산 If CrossDown(value, SPercent) Then { Sell(); } 1번은 볼랜즈밴드 2번은 rsi전략인데 이두개의 시스템을 하나로 묵고 싶습니다 1. 매수진입 두신호의 교집합 둘다 동일한 매수신호 구간에서 매수진입 2.매수청산 어느 한쪽이 매도로 바뀌면 청산 3.매도진입 두 신호가 매도 교집합 일때 매도 진입 4.매도청산 어느 한쪽이 매수로 바뀌면 청산 이런 전략을 부탁드립니다 항상 감사드립니다
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2022-08-26 09:59:23

안녕하세요 예스스탁입니다. Inputs: Length(9), StdDev(2), Bars(2); Input : Period(14), LPercent(30), SPercent(70); Var : BBTop(0),BBBot(0),value(0); Var : T(0),S(0); BBTop = BollBandup(Length, StdDev); BBBot = BollBanddown(Length, StdDev); value = RSI(Period); If CountIF(Close < BBBot, Bars) == Bars Then T = 1; If CountIF(Close > BBTop, Bars) == Bars Then T = -1; # 매수/매도청산 If CrossUP(value, LPercent) Then S = 1; # 매도/매수청산 If CrossDown(value, SPercent) Then S = -1; Condition1 = T == 1 and S == 1; Condition2 = T == -1 and S == -1; if MarketPosition <= 0 and Condition1 == true and Condition1[1] == False Then Buy(); if MarketPosition >= 0 and Condition2 == true and Condition2[1] == False Then Sell(); if MarketPosition == 1 and Condition1 == False Then ExitLong(); if MarketPosition == -1 and Condition2 == False Then ExitShort(); 즐거운 하루되세요 > cjfdk 님이 쓴 글입니다. > 제목 : 문의드립니다 > 1. Inputs: Length(9), StdDev(2), Bars(2); Variables: BBTop(0),BBBot(0); BBTop = BollBandup(Length, StdDev); BBBot = BollBanddown(Length, StdDev); If CountIF(Close < BBBot, Bars) == Bars Then Buy("BBtop", AtStop, BBBot); If CountIF(Close > BBTop, Bars) == Bars Then Sell("BBbot", AtStop, BBTop); 2. Input : Period(14), LPercent(30), SPercent(70); Var : value(0); value = RSI(Period); # 매수/매도청산 If CrossUP(value, LPercent) Then { Buy(); } # 매도/매수청산 If CrossDown(value, SPercent) Then { Sell(); } 1번은 볼랜즈밴드 2번은 rsi전략인데 이두개의 시스템을 하나로 묵고 싶습니다 1. 매수진입 두신호의 교집합 둘다 동일한 매수신호 구간에서 매수진입 2.매수청산 어느 한쪽이 매도로 바뀌면 청산 3.매도진입 두 신호가 매도 교집합 일때 매도 진입 4.매도청산 어느 한쪽이 매수로 바뀌면 청산 이런 전략을 부탁드립니다 항상 감사드립니다