커뮤니티

수식추가

프로필 이미지
아트정
2024-10-21 08:30:16
652
글번호 184435
답변완료
Inputs : Period(20), Sence(1.5), CC_DN(Yellow); Vars: VLineUp(0), VLineDn(0), HHighest(0), LLowest(0), JustChanged(FALSE), VLine(0), DBN(0); Array: Highs[35](0), Lows[35](0), RRange[35](0), UpWave[1](FALSE), DnWave[1](FALSE); If STime == 180000 Then DBN = 0; DBN = DBN + 1; Var1 = Period; Var2 = Var1 - 1; Var3 = Var1 - 2; Var5 = Sence; Var6 = H-L; JustChanged = FALSE; if CurrentBar <= Var2 then begin Highs[CurrentBar] = Close; Lows[CurrentBar] = Close; RRange[CurrentBar] = (H-L) /2; end; if CurrentBar == Var1 then begin if Highs[Var2] >= Highs[Var3] then begin UpWave[1] = TRUE; HHighest = Highs[Var2]; VLineUp = HHighest - (Var5 * MA(Var6,Var2)); #Plot1(VLineUp,"VLineUp"); end; if Highs[Var2] < Highs[Var3] then begin DnWave[1] = TRUE; LLowest = Lows[Var2]; VLineDn = LLowest + (Var5 * MA(Var6,Var2)); #Plot2(VLineDn,"VLineDn"); end; end; if CurrentBar > Var1 then begin if DnWave[1] and Close > VLineDn then begin DnWave[1] = FALSE; UpWave[1] = TRUE; JustChanged = TRUE; HHighest = Close; LLowest = 0; end; if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin UpWave[1] = FALSE; DnWave[1] = TRUE; JustChanged = TRUE; LLowest = Close; HHighest = 0; end; if JustChanged == FALSE then begin if Close > HHighest then HHighest = Close; else if Close < LLowest then LLowest = Close; end; VLineUp = HHighest - (Var5 * MA(Var6,Var2)); VLineDn = LLowest + (Var5 * MA(Var6,Var2)); /*if UpWave[1] then Plot1(VLineUp,"VLineUp", Red); else if DnWave[1] then Plot1(VLineDn,"VLineUp", Blue); */ end; input : P(10),short(12),long(26),sig(9); var : mav(0),macdo(0); mav = ma(C,P); MACDo = MACD_OSC(short,long,sig); if upwave[1] and c > o and mav > mav[1] Then Buy(); if dnwave[1] and c < o and mav < mav[1] Then Sell(); if MarketPosition == 1 Then { if dnwave[1] and macdo < 0 Then ExitLong("bx"); } if MarketPosition == -1 Then { if upwave[1] and macdo > 0 Then ExitShort("sx"); } 안녕하세요 위식에 추가식 부탁드림니다 Date 2 30분봉 매수 기존식에 30분봉 양봉일때 매수 매도 기존식에 30분봉 음봉일때 매도
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-10-22 10:18:04

안녕하세요 예스스탁입니다. Inputs : Period(20), Sence(1.5), CC_DN(Yellow); Vars: VLineUp(0,data1), VLineDn(0,data1), HHighest(0,data1), LLowest(0,data1), JustChanged(FALSE,data1), VLine(0,data1), DBN(0,data1); Array: Highs[35](0,data1), Lows[35](0,data1), RRange[35](0,data1), UpWave[1](FALSE,data1), DnWave[1](FALSE,data1); var : v1(0,Data1),v2(0,Data1),v3(0,Data1),v5(0,Data1),v6(0,Data1),ii(0,Data1); if Data1(c) > 0 and Data2(c) > 0 Then ii = ii +1; If data1(STime == 180000) Then DBN = 0; DBN = DBN + 1; v1 = Period; v2 = v1 - 1; v3 = v1 - 2; v5 = Sence; v6 = data1(H-L); JustChanged = FALSE; if data1(ii <= v2) then begin Highs[data1(ii)] = data1(Close); Lows[data1(ii)] = data1(Close); RRange[data1(ii)] = Data1((H-L) /2); end; if data1(ii == v1) then begin if Highs[v2] >= Highs[v3] then begin UpWave[1] = TRUE; HHighest = Highs[v2]; VLineUp = HHighest - (v5 * data1(MA(v6,v2))); #Plot1(VLineUp,"VLineUp"); end; if Highs[v2] < Highs[v3] then begin DnWave[1] = TRUE; LLowest = Lows[v2]; VLineDn = LLowest + (v5 * data1(MA(v6,v2))); #Plot2(VLineDn,"VLineDn"); end; end; if data1(ii > v1) then begin if DnWave[1] and Close > VLineDn then begin DnWave[1] = FALSE; UpWave[1] = TRUE; JustChanged = TRUE; HHighest = data1(Close); LLowest = 0; end; if data1(UpWave[1] and Close < VLineUp and JustChanged == FALSE) then begin UpWave[1] = FALSE; DnWave[1] = TRUE; JustChanged = TRUE; LLowest = data1(Close); HHighest = 0; end; if JustChanged == FALSE then begin if data1(Close) > HHighest then HHighest = data1(Close); else if data1(Close) < LLowest then LLowest = data1(Close); end; VLineUp = HHighest - (v5 * data1(MA(v6,v2))); VLineDn = LLowest + (v5 * data1(MA(v6,v2))); /*if UpWave[1] then Plot1(VLineUp,"VLineUp", Red); else if DnWave[1] then Plot1(VLineDn,"VLineUp", Blue); */ end; input : P(10),short(12),long(26),sig(9); var : mav(0,Data1),macdo(0,Data1); mav = data1(ma(C,P)); MACDo = data1(MACD_OSC(short,long,sig)); if upwave[1] and data1(c > o) and mav > mav[1] and Data2(C>O) Then Buy(); if dnwave[1] and data1(c < o) and mav < mav[1] and Data2(C<O) Then Sell(); if MarketPosition == 1 Then { if dnwave[1] and macdo < 0 Then ExitLong("bx"); } if MarketPosition == -1 Then { if upwave[1] and macdo > 0 Then ExitShort("sx"); } 즐거운 하루되세요 > 아트정 님이 쓴 글입니다. > 제목 : 수식추가 > Inputs : Period(20), Sence(1.5), CC_DN(Yellow); Vars: VLineUp(0), VLineDn(0), HHighest(0), LLowest(0), JustChanged(FALSE), VLine(0), DBN(0); Array: Highs[35](0), Lows[35](0), RRange[35](0), UpWave[1](FALSE), DnWave[1](FALSE); If STime == 180000 Then DBN = 0; DBN = DBN + 1; Var1 = Period; Var2 = Var1 - 1; Var3 = Var1 - 2; Var5 = Sence; Var6 = H-L; JustChanged = FALSE; if CurrentBar <= Var2 then begin Highs[CurrentBar] = Close; Lows[CurrentBar] = Close; RRange[CurrentBar] = (H-L) /2; end; if CurrentBar == Var1 then begin if Highs[Var2] >= Highs[Var3] then begin UpWave[1] = TRUE; HHighest = Highs[Var2]; VLineUp = HHighest - (Var5 * MA(Var6,Var2)); #Plot1(VLineUp,"VLineUp"); end; if Highs[Var2] < Highs[Var3] then begin DnWave[1] = TRUE; LLowest = Lows[Var2]; VLineDn = LLowest + (Var5 * MA(Var6,Var2)); #Plot2(VLineDn,"VLineDn"); end; end; if CurrentBar > Var1 then begin if DnWave[1] and Close > VLineDn then begin DnWave[1] = FALSE; UpWave[1] = TRUE; JustChanged = TRUE; HHighest = Close; LLowest = 0; end; if UpWave[1] and Close < VLineUp and JustChanged == FALSE then begin UpWave[1] = FALSE; DnWave[1] = TRUE; JustChanged = TRUE; LLowest = Close; HHighest = 0; end; if JustChanged == FALSE then begin if Close > HHighest then HHighest = Close; else if Close < LLowest then LLowest = Close; end; VLineUp = HHighest - (Var5 * MA(Var6,Var2)); VLineDn = LLowest + (Var5 * MA(Var6,Var2)); /*if UpWave[1] then Plot1(VLineUp,"VLineUp", Red); else if DnWave[1] then Plot1(VLineDn,"VLineUp", Blue); */ end; input : P(10),short(12),long(26),sig(9); var : mav(0),macdo(0); mav = ma(C,P); MACDo = MACD_OSC(short,long,sig); if upwave[1] and c > o and mav > mav[1] Then Buy(); if dnwave[1] and c < o and mav < mav[1] Then Sell(); if MarketPosition == 1 Then { if dnwave[1] and macdo < 0 Then ExitLong("bx"); } if MarketPosition == -1 Then { if upwave[1] and macdo > 0 Then ExitShort("sx"); } 안녕하세요 위식에 추가식 부탁드림니다 Date 2 30분봉 매수 기존식에 30분봉 양봉일때 매수 매도 기존식에 30분봉 음봉일때 매도