커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-02-13 13:44:01
245
글번호 116561
답변완료
도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 예스 시작한 날 세어보니 190일 정도 되는데요. 전 여기까지 온 것만해도 참 열심히 했다고 생각했는데 한달만에 마스터하고 넘어가는 사람들도 있다고 하니 뭔가 방식이 잘못됐는가 싶네요. 그렇다고 다른 투입 시간을 줄이기도 쉽지 않아 난감할 따름입니다. ;;; 1. 코드 변환 부탁드립니다. Type: Function Name: AMA Inputs: Period(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = Summation(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); End; AMA = AdaptMA; Type: Function Name: AMAF Inputs: Period(Numeric), Pcnt(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0), AMAFltr(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = Summation(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); AMAFltr = StdDev(AdaptMA-AdaptMA[1], Period) * Pcnt; End Type: Indicator Name: MovAvg Adaptive Inputs: Period(10), Smooth(“Y”); IF UpperStr(Smooth) = “Y” Then Plot1(LinearRegValue(AMA(Period), Period, 0), “Smooth AMA”) Else Plot2(AMA(Period), “Adaptive MA”); Type: Indicator Name: MovAvg Adaptive Fltr Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar = 1 Then Begin AMALs = AMAVal; AMAHs = AMAVal; End Else Begin IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF AMAVal - AMALs > AMAFVal Then Begin Plot1(AMAFVal, “Buy”); IF Plot1[1] = 0 Then Alert = True; End Else IF AMAHs - AMAVal > AMAFVal Then Begin Plot2(AMAFVal, “Sell”); IF Plot2[1] = 0 Then Alert = True; End; Plot3(AMAFVal, “AMAFilter”); End; Style: Plot Name Type Color Weight Plot1 Buy Histogram Blue thinnest Plot2 Sell Histogram Red thinnest Plot3 AMAFilter Line Magenta thinnest Scaling: Screen Type: System Name: MovAvg Adaptive Fltr Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar = 1 Then Begin AMALs = AMAVal; AMAHs = AMAVal; End Else Begin IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF AMAVal - AMALs Crosses Above AMAFVal Then Buy This Bar on Close; IF AMAHs - AMAVal Crosses Above AMAFVal Then Sell This Bar on Close; End; 2. 56661 재답변 부탁드립니다.
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-02-13 15:04:01

안녕하세요 예스스탁입니다. 1 사용자함수명 : AMA 반환값형 : 숫자형 Inputs: Period(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = AccumN(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); End; AMA = AdaptMA; 2 사용자함수명 : AMAF 반환값형 : 숫자형 Inputs: Period(Numeric), Pcnt(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0), AMAFltr(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = AccumN(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); AMAFltr = Std(AdaptMA-AdaptMA[1], Period) * Pcnt; End AMAF = AMAFltr; 3 지표 Inputs : Period(10),Smooth(1); IF Smooth == 1 Then Plot1(LRL(AMA(Period), Period),"SmoothAMA"); Else Plot2(AMA(Period),"Adaptive MA"); 4 지표 Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar == 1 Then { AMALs = AMAVal; AMAHs = AMAVal; } Else { IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF AMAVal - AMALs > AMAFVal Then Plot1(AMAFVal,"Buy"); IF AMAHs - AMAVal > AMAFVal Then Plot2(AMAFVal,"Sell"); } Plot3(AMAFVal,"AMAFilter"); 5 시스템 Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar == 1 Then Begin AMALs = AMAVal; AMAHs = AMAVal; End Else Begin IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF crossup(AMAVal - AMALs,AMAFVal) Then Buy(); IF CrossDown(AMAHs - AMAVal,AMAFVal) Then Sell(); End; 6 56661번에 답변드렸습니다. 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 도움주시는 덕분에 도전하고 있습니다. 매번 감사합니다. 예스 시작한 날 세어보니 190일 정도 되는데요. 전 여기까지 온 것만해도 참 열심히 했다고 생각했는데 한달만에 마스터하고 넘어가는 사람들도 있다고 하니 뭔가 방식이 잘못됐는가 싶네요. 그렇다고 다른 투입 시간을 줄이기도 쉽지 않아 난감할 따름입니다. ;;; 1. 코드 변환 부탁드립니다. Type: Function Name: AMA Inputs: Period(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = Summation(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); End; AMA = AdaptMA; Type: Function Name: AMAF Inputs: Period(Numeric), Pcnt(Numeric); Vars: Noise(0), Signal(0), Diff(0), efRatio(0), Smooth(1), Fastest(.6667), Slowest(.0645), AdaptMA(0), AMAFltr(0); Diff = AbsValue(Close - Close[1]); IF CurrentBar <= Period Then AdaptMA = Close; IF CurrentBar > Period Then Begin Signal = AbsValue(Close - Close[Period]); Noise = Summation(Diff, Period); efRatio = Signal / Noise; Smooth = Power(efRatio * (Fastest - Slowest) + Slowest, 2); AdaptMA = AdaptMA[1] + Smooth * (Close - AdaptMA[1]); AMAFltr = StdDev(AdaptMA-AdaptMA[1], Period) * Pcnt; End Type: Indicator Name: MovAvg Adaptive Inputs: Period(10), Smooth(“Y”); IF UpperStr(Smooth) = “Y” Then Plot1(LinearRegValue(AMA(Period), Period, 0), “Smooth AMA”) Else Plot2(AMA(Period), “Adaptive MA”); Type: Indicator Name: MovAvg Adaptive Fltr Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar = 1 Then Begin AMALs = AMAVal; AMAHs = AMAVal; End Else Begin IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF AMAVal - AMALs > AMAFVal Then Begin Plot1(AMAFVal, “Buy”); IF Plot1[1] = 0 Then Alert = True; End Else IF AMAHs - AMAVal > AMAFVal Then Begin Plot2(AMAFVal, “Sell”); IF Plot2[1] = 0 Then Alert = True; End; Plot3(AMAFVal, “AMAFilter”); End; Style: Plot Name Type Color Weight Plot1 Buy Histogram Blue thinnest Plot2 Sell Histogram Red thinnest Plot3 AMAFilter Line Magenta thinnest Scaling: Screen Type: System Name: MovAvg Adaptive Fltr Inputs: Period(10), Pcnt(.15); Vars: AMAVal(0), AMAFVal(0), AMALs(0), AMAHs(0); AMAVal = AMA(Period); AMAFVAl = AMAF(Period, Pcnt); IF CurrentBar = 1 Then Begin AMALs = AMAVal; AMAHs = AMAVal; End Else Begin IF AMAVal < AMAVal[1] Then AMALs = AMAVal; IF AMAVal > AMAVal[1] Then AMAHs = AMAVal; IF AMAVal - AMALs Crosses Above AMAFVal Then Buy This Bar on Close; IF AMAHs - AMAVal Crosses Above AMAFVal Then Sell This Bar on Close; End; 2. 56661 재답변 부탁드립니다.