커뮤니티

예스 랭귀지로 변환 좀 부탁드립니다!!

프로필 이미지
sdfxwe
2011-05-11 03:28:55
743
글번호 38470
답변완료
Inputs: Interval(NumericSimple); Variables: IsNewBar(false), Hour(0), Minute(0), CheckTime(0), PrevTime(0); IsNewBar = false; if Date <> Date[1] then begin Hour = IntPortion(TimeToMinutes(Time) / 60); Minute = TimeToMinutes(Time) - Hour * 60; if Mod(Minute, Interval) = 0 then CheckTime = MinutesToTime(Hour * 60 + (IntPortion(Minute / Interval) - 1) * Interval) else CheckTime = MinutesToTime(Hour * 60 + IntPortion(Minute / Interval) * Interval); end; if Time <> PrevTime then begin PrevTime = Time; while Time >= CalcTime(CheckTime, Interval) begin if Time[1] > CheckTime then IsNewBar = true; CheckTime = CalcTime(CheckTime, Interval); end; end; Inputs: Interval(NumericSimple), Length(NumericSimple); Variables: Factor(.5), BarCount(0), Counter(0); Arrays: FastDArray[2](0), SlowDArray[2](0); if _IsNewBar_1m(Interval) then begin BarCount = BarCount + 1; for Counter = 2 downto 1 begin FastDArray[Counter] = FastDArray[Counter - 1]; SlowDArray[Counter] = SlowDArray[Counter - 1]; end; if BarCount <= 1 then begin FastDArray[0] = FastK(Length * Interval); SlowDArray[0] = FastDArray[0]; end else begin FastDArray[0] = FastDArray[1] + (Factor * (FastK(Length * Interval) - FastDArray[1])); SlowDArray[0] = ((SlowDArray[1] * 2) + (FastDArray[1] + (Factor * (FastK(Length * Interval) - FastDArray[1])))) / 3; end; end; if BarCount > 0 then _SlowD_1m = SlowDArray[0] else _SlowD_1m = 0; Inputs: Length(NumericSimple); Value1 = Lowest(Low, Length); Value2 = Highest(High, Length) - Value1; Value3 = Close; If Value2 > 0 Then FastK = (Value3 - Value1) / Value2 * 100 Else FastK = 0; 좀 부탁드리겠습니다!! 제가 바꾸려니 너무 막막하네요....ㅠㅠ
시스템
답변 2
프로필 이미지

예스스탁 예스스탁 답변

2011-05-11 16:17:56

안녕하세요 예스스탁입니다. 수식 내부에 모르는 사용자함수가 있어 변경이 가능하지 않습니다. 도움을 드리지 못해 죄송합니다. fastK와 같은 경우는 기본으로 제공되고 있습니다. 즐거운 하루되세요 > sdfxwe 님이 쓴 글입니다. > 제목 : 예스 랭귀지로 변환 좀 부탁드립니다!! > Inputs: Interval(NumericSimple); Variables: IsNewBar(false), Hour(0), Minute(0), CheckTime(0), PrevTime(0); IsNewBar = false; if Date <> Date[1] then begin Hour = IntPortion(TimeToMinutes(Time) / 60); Minute = TimeToMinutes(Time) - Hour * 60; if Mod(Minute, Interval) = 0 then CheckTime = MinutesToTime(Hour * 60 + (IntPortion(Minute / Interval) - 1) * Interval) else CheckTime = MinutesToTime(Hour * 60 + IntPortion(Minute / Interval) * Interval); end; if Time <> PrevTime then begin PrevTime = Time; while Time >= CalcTime(CheckTime, Interval) begin if Time[1] > CheckTime then IsNewBar = true; CheckTime = CalcTime(CheckTime, Interval); end; end; Inputs: Interval(NumericSimple), Length(NumericSimple); Variables: Factor(.5), BarCount(0), Counter(0); Arrays: FastDArray[2](0), SlowDArray[2](0); if _IsNewBar_1m(Interval) then begin BarCount = BarCount + 1; for Counter = 2 downto 1 begin FastDArray[Counter] = FastDArray[Counter - 1]; SlowDArray[Counter] = SlowDArray[Counter - 1]; end; if BarCount <= 1 then begin FastDArray[0] = FastK(Length * Interval); SlowDArray[0] = FastDArray[0]; end else begin FastDArray[0] = FastDArray[1] + (Factor * (FastK(Length * Interval) - FastDArray[1])); SlowDArray[0] = ((SlowDArray[1] * 2) + (FastDArray[1] + (Factor * (FastK(Length * Interval) - FastDArray[1])))) / 3; end; end; if BarCount > 0 then _SlowD_1m = SlowDArray[0] else _SlowD_1m = 0; Inputs: Length(NumericSimple); Value1 = Lowest(Low, Length); Value2 = Highest(High, Length) - Value1; Value3 = Close; If Value2 > 0 Then FastK = (Value3 - Value1) / Value2 * 100 Else FastK = 0; 좀 부탁드리겠습니다!! 제가 바꾸려니 너무 막막하네요....ㅠㅠ
프로필 이미지

sdfxwe

2011-05-12 00:42:47

sdfxwe 님에 의해 삭제된 답변입니다.