커뮤니티

문의드립니다.

프로필 이미지
회원
2015-12-08 10:22:59
149
글번호 93130
답변완료
Input : RSIP(9), Period(14),dv(2); var : RSIV(0),Mid(0),BBup(0),BBdn(0); RSIV = RSI(RSIP); Mid = ma(RSIV,Period); BBup = Mid+STD(MId,Period)*dv; BBdn = Mid-STD(MId,Period)*dv; Plot1(RSIV, "RSI"); Plot2(Mid, "BBmid"); Plot3(BBup, "BBup"); Plot4(BBdn, "BBdn"); PlotBaseLine1(30, "기준선 30", gray); PlotBaseLine2(70, "기준선 70", gray); .......................................................................... 상기 지표를 데이타2 참조지표로 가공해 주세요 2. inputs : ShowAll(true),굵기(0),상승(red),하락(blue); var : BoxTop(0), BoxBtm(0), Ctr(0), BBD(0), BBT(0), EBD(0), EBT(0), UpBand(0), DnBand(0), CurrState(1), TextId(-1), TopId(-1), TopIdP(-1), BtmId(-1), BtmIdP(-1), LSId(-1), LSIdP(-1), RSId(-1), RSIdP(-1), HiFirst(true), LoFirst(false), State1(false), State2(false), State3(false), State4(false), State5(false), DrawBox(false), ValidBox(false), HadBreak(false), NewBox(false); if index == 1 then begin BoxTop = high; BoxBtm = low; State1 = true; BBD = date; BBT = time; end; if NewBox and high > UpBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId ; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete( RSIdP ) ; if HiFirst then TL_SetColor(RSId, 상승); else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; LoFirst = false; HiFirst = true; end; if NewBox and low < DnBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete(RSIdP); if HiFirst then TL_SetColor(RSId, 상승) ; else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; HiFirst = false; LoFirst = true; end; if HiFirst then begin if State4 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State4 = false; CurrState = 1; end else begin if low < BoxBtm then begin State4 = false; State3 = true; BoxBtm = low; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State3 = false; CurrState = 1; end else begin if low < BoxBtm then begin State3 = true; BoxBtm = low; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxBtm = low; CurrState = 3; end; end; if State1 then begin if high > BoxTop then begin BoxTop = high; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end else begin #{ Using LoFirst } if State4 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State4 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; State4 = false; BoxTop = high; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State3 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; BoxTop = high; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if low < BoxBtm then begin Boxbtm = low; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxTop = high; CurrState = 3; end; end; if State1 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end; #{ END IF HIFIRST OR LOFIRST } if State5 then begin DrawBox = true; EBD = date; EBT = time; end; if DrawBox then begin TopIdP = TopId; BtmIdP = BtmId; LSIdP = LSId; TopId = TL_New(BBD, BBT, BoxTop, EBD, EBT, BoxTop); BtmId = TL_New(BBD, BBT, BoxBtm, EBD, EBT, BoxBtm); LSId = TL_New(BBD, BBT, BoxBtm, BBD, BBT, BoxTop); TL_SetSize(TopId,굵기); TL_SetSize(BtmId,굵기); TL_SetSize(LSId,굵기); TL_SetSize(RSId,굵기); if ShowAll == false then begin if TopIdP <> -1 then TL_Delete(TopIdP); if BtmIdP <> -1 then TL_Delete(BtmIdP); if LSIdP <> -1 then TL_Delete(LSidP); end; if HiFirst then begin TL_SetColor(TopId, 상승); TL_SetColor(BtmId, 상승); TL_SetColor(LSId, 상승); end else begin TL_SetColor(TopId, 하락); TL_SetColor(BtmId, 하락); TL_SetColor(LSId, 하락); end; State1 = false; State2 = false; State3 = false; State4 = false; State5 = false; DrawBox = false; ValidBox = true; end; if ValidBox then begin UpBand = BoxTop; DnBand = BoxBtm; ValidBox = false; NewBox = true; BoxTop = high; BoxBtm = low; end; if HiFirst then TextId = Text_New(date, time, high * 1.0005, NumToStr(CurrState, 0)); else TextId = Text_New(date, time, low * 0.9995, NumToStr(CurrState, 0)); .............................................................................. 2번 지표를 실행하다 보면 화면에 1,2,3,4,5 라고 나타나는데 보기 너무 불편하더라구요. 숫자들 안보이게 해주세요 그리고 박스 상단 가격과 하단 가격이 챠트상에 나타날수 있게 해주세요 (박스 상하단 주위에 자동적으로 뜰수 있게) 부탁 드립니다 3. input : MACDP1(12),MACDP2(26),MACDP3(9),WmaP1(10),WMAP2(20),STo1(10),Sto2(5); var1 = macd(MACDP1,MACDP2); var2 = ema(var1,MACDP3); var3 = Wma(C,wmaP1); var4 = wma(c,wmaP2); var5 = StochasticsK(sto1,sto2); if var1 > var2 and var3 > var4 and var5 > 50 And (crossup(var1,var2) or crossup(var3,var4) or crossup(var5,0)) Then buy(); if var1 < var2 and var3 < var4 and var5 < 50 And (CrossDown(var1,var2) or CrossDown(var3,var4) or CrossDown(var5,0)) Then sell(); 상기 시스템식에 아래 지표를 결합 시키고 싶네요 지표 내용은 rsi 50이상이면 매수 50이하면 매도 입니다. 상기시스템식과 아래 지표를 결합해 주세요 Input : Period(14); var : RSIV(0); RSIV = RSI(Period); if RSIV >= 50 Then Plot1(RSIV, "RSI",RED); Else plot1(RSIV,"RSI",blue); PlotBaseLine1(50); 너무 많은 질문을 드린것 같아 죄송합니다 감사합니다
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-12-08 14:03:10

안녕하세요 예스스탁입니다. 1. Input : RSIP(9), Period(14),dv(2); var : RSIV(0,data2),Mid(0,data2),BBup(0,data2),BBdn(0,data2); RSIV = data2(RSI(RSIP)); Mid = data2(ma(RSIV,Period)); BBup = data2(Mid+STD(MId,Period)*dv); BBdn = data2(Mid-STD(MId,Period)*dv); Plot1(RSIV, "RSI"); Plot2(Mid, "BBmid"); Plot3(BBup, "BBup"); Plot4(BBdn, "BBdn"); PlotBaseLine1(30, "기준선 30", gray); PlotBaseLine2(70, "기준선 70", gray); 2. inputs : ShowAll(true),굵기(0),상승(red),하락(blue); var : BoxTop(0), BoxBtm(0), Ctr(0), BBD(0), BBT(0), EBD(0), EBT(0), UpBand(0), DnBand(0), CurrState(1), TextId(-1), TopId(-1), TopIdP(-1), BtmId(-1), BtmIdP(-1), LSId(-1), LSIdP(-1), RSId(-1), RSIdP(-1), HiFirst(true), LoFirst(false), State1(false), State2(false), State3(false), State4(false), State5(false), DrawBox(false), ValidBox(false), HadBreak(false), NewBox(false); if index == 1 then begin BoxTop = high; BoxBtm = low; State1 = true; BBD = date; BBT = time; end; if NewBox and high > UpBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId ; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete( RSIdP ) ; if HiFirst then TL_SetColor(RSId, 상승); else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; LoFirst = false; HiFirst = true; end; if NewBox and low < DnBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete(RSIdP); if HiFirst then TL_SetColor(RSId, 상승) ; else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; HiFirst = false; LoFirst = true; end; if HiFirst then begin if State4 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State4 = false; CurrState = 1; end else begin if low < BoxBtm then begin State4 = false; State3 = true; BoxBtm = low; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State3 = false; CurrState = 1; end else begin if low < BoxBtm then begin State3 = true; BoxBtm = low; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxBtm = low; CurrState = 3; end; end; if State1 then begin if high > BoxTop then begin BoxTop = high; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end else begin #{ Using LoFirst } if State4 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State4 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; State4 = false; BoxTop = high; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State3 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; BoxTop = high; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if low < BoxBtm then begin Boxbtm = low; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxTop = high; CurrState = 3; end; end; if State1 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end; #{ END IF HIFIRST OR LOFIRST } if State5 then begin DrawBox = true; EBD = date; EBT = time; end; if DrawBox then begin TopIdP = TopId; BtmIdP = BtmId; LSIdP = LSId; TopId = TL_New(BBD, BBT, BoxTop, EBD, EBT, BoxTop); BtmId = TL_New(BBD, BBT, BoxBtm, EBD, EBT, BoxBtm); LSId = TL_New(BBD, BBT, BoxBtm, BBD, BBT, BoxTop); TL_SetSize(TopId,굵기); TL_SetSize(BtmId,굵기); TL_SetSize(LSId,굵기); TL_SetSize(RSId,굵기); if ShowAll == false then begin if TopIdP <> -1 then TL_Delete(TopIdP); if BtmIdP <> -1 then TL_Delete(BtmIdP); if LSIdP <> -1 then TL_Delete(LSidP); end; if HiFirst then begin TL_SetColor(TopId, 상승); TL_SetColor(BtmId, 상승); TL_SetColor(LSId, 상승); end else begin TL_SetColor(TopId, 하락); TL_SetColor(BtmId, 하락); TL_SetColor(LSId, 하락); end; State1 = false; State2 = false; State3 = false; State4 = false; State5 = false; DrawBox = false; ValidBox = true; end; if ValidBox then begin UpBand = BoxTop; DnBand = BoxBtm; ValidBox = false; NewBox = true; BoxTop = high; BoxBtm = low; end; 3. input : MACDP1(12),MACDP2(26),MACDP3(9),WmaP1(10),WMAP2(20),STo1(10),Sto2(5); Input : Period(14); var : RSIV(0); RSIV = RSI(Period); var1 = macd(MACDP1,MACDP2); var2 = ema(var1,MACDP3); var3 = Wma(C,wmaP1); var4 = wma(c,wmaP2); var5 = StochasticsK(sto1,sto2); if RSIV >= 50 and var1 > var2 and var3 > var4 and var5 > 50 And (crossup(var1,var2) or crossup(var3,var4) or crossup(var5,0)) Then buy(); if RSIV <= 50 and var1 < var2 and var3 < var4 and var5 < 50 And (CrossDown(var1,var2) or CrossDown(var3,var4) or CrossDown(var5,0)) Then sell(); 즐거운 하루되세요 > alsk 님이 쓴 글입니다. > 제목 : 문의드립니다. > Input : RSIP(9), Period(14),dv(2); var : RSIV(0),Mid(0),BBup(0),BBdn(0); RSIV = RSI(RSIP); Mid = ma(RSIV,Period); BBup = Mid+STD(MId,Period)*dv; BBdn = Mid-STD(MId,Period)*dv; Plot1(RSIV, "RSI"); Plot2(Mid, "BBmid"); Plot3(BBup, "BBup"); Plot4(BBdn, "BBdn"); PlotBaseLine1(30, "기준선 30", gray); PlotBaseLine2(70, "기준선 70", gray); .......................................................................... 상기 지표를 데이타2 참조지표로 가공해 주세요 2. inputs : ShowAll(true),굵기(0),상승(red),하락(blue); var : BoxTop(0), BoxBtm(0), Ctr(0), BBD(0), BBT(0), EBD(0), EBT(0), UpBand(0), DnBand(0), CurrState(1), TextId(-1), TopId(-1), TopIdP(-1), BtmId(-1), BtmIdP(-1), LSId(-1), LSIdP(-1), RSId(-1), RSIdP(-1), HiFirst(true), LoFirst(false), State1(false), State2(false), State3(false), State4(false), State5(false), DrawBox(false), ValidBox(false), HadBreak(false), NewBox(false); if index == 1 then begin BoxTop = high; BoxBtm = low; State1 = true; BBD = date; BBT = time; end; if NewBox and high > UpBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId ; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete( RSIdP ) ; if HiFirst then TL_SetColor(RSId, 상승); else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; LoFirst = false; HiFirst = true; end; if NewBox and low < DnBand then begin BBD = date; BBT = time; TL_SetEnd(TopId, BBD, BBT, UpBand); TL_SetEnd(BtmId, BBD, BBt, DnBand); RSIdP = RSId; RSId = TL_New(BBD, BBT, DnBand, BBD, BBT, UpBand); if ShowAll == false and RSIdP <> -1 then TL_Delete(RSIdP); if HiFirst then TL_SetColor(RSId, 상승) ; else TL_SetColor(RSId, 하락); NewBox = false; State1 = true; HiFirst = false; LoFirst = true; end; if HiFirst then begin if State4 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State4 = false; CurrState = 1; end else begin if low < BoxBtm then begin State4 = false; State3 = true; BoxBtm = low; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State3 = false; CurrState = 1; end else begin if low < BoxBtm then begin State3 = true; BoxBtm = low; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if high > BoxTop then begin BoxTop = high; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxBtm = low; CurrState = 3; end; end; if State1 then begin if high > BoxTop then begin BoxTop = high; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end else begin #{ Using LoFirst } if State4 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State4 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; State4 = false; BoxTop = high; CurrState = 3; end else begin State4 = false; State5 = true; CurrState = 5; end; end; end; if State3 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; State3 = false; CurrState = 1; end else begin if high > BoxTop then begin State3 = true; BoxTop = high; CurrState = 3; end else begin State3 = false; State4 = true; CurrState = 4; end; end; end; if State2 then begin if low < BoxBtm then begin Boxbtm = low; State1 = true; State2 = false; CurrState = 1; end else begin State2 = false; State3 = true; BoxTop = high; CurrState = 3; end; end; if State1 then begin if low < BoxBtm then begin BoxBtm = low; State1 = true; CurrState = 1; end else begin State1 = false; State2 = true; CurrState = 2; end; end; end; #{ END IF HIFIRST OR LOFIRST } if State5 then begin DrawBox = true; EBD = date; EBT = time; end; if DrawBox then begin TopIdP = TopId; BtmIdP = BtmId; LSIdP = LSId; TopId = TL_New(BBD, BBT, BoxTop, EBD, EBT, BoxTop); BtmId = TL_New(BBD, BBT, BoxBtm, EBD, EBT, BoxBtm); LSId = TL_New(BBD, BBT, BoxBtm, BBD, BBT, BoxTop); TL_SetSize(TopId,굵기); TL_SetSize(BtmId,굵기); TL_SetSize(LSId,굵기); TL_SetSize(RSId,굵기); if ShowAll == false then begin if TopIdP <> -1 then TL_Delete(TopIdP); if BtmIdP <> -1 then TL_Delete(BtmIdP); if LSIdP <> -1 then TL_Delete(LSidP); end; if HiFirst then begin TL_SetColor(TopId, 상승); TL_SetColor(BtmId, 상승); TL_SetColor(LSId, 상승); end else begin TL_SetColor(TopId, 하락); TL_SetColor(BtmId, 하락); TL_SetColor(LSId, 하락); end; State1 = false; State2 = false; State3 = false; State4 = false; State5 = false; DrawBox = false; ValidBox = true; end; if ValidBox then begin UpBand = BoxTop; DnBand = BoxBtm; ValidBox = false; NewBox = true; BoxTop = high; BoxBtm = low; end; if HiFirst then TextId = Text_New(date, time, high * 1.0005, NumToStr(CurrState, 0)); else TextId = Text_New(date, time, low * 0.9995, NumToStr(CurrState, 0)); .............................................................................. 2번 지표를 실행하다 보면 화면에 1,2,3,4,5 라고 나타나는데 보기 너무 불편하더라구요. 숫자들 안보이게 해주세요 그리고 박스 상단 가격과 하단 가격이 챠트상에 나타날수 있게 해주세요 (박스 상하단 주위에 자동적으로 뜰수 있게) 부탁 드립니다 3. input : MACDP1(12),MACDP2(26),MACDP3(9),WmaP1(10),WMAP2(20),STo1(10),Sto2(5); var1 = macd(MACDP1,MACDP2); var2 = ema(var1,MACDP3); var3 = Wma(C,wmaP1); var4 = wma(c,wmaP2); var5 = StochasticsK(sto1,sto2); if var1 > var2 and var3 > var4 and var5 > 50 And (crossup(var1,var2) or crossup(var3,var4) or crossup(var5,0)) Then buy(); if var1 < var2 and var3 < var4 and var5 < 50 And (CrossDown(var1,var2) or CrossDown(var3,var4) or CrossDown(var5,0)) Then sell(); 상기 시스템식에 아래 지표를 결합 시키고 싶네요 지표 내용은 rsi 50이상이면 매수 50이하면 매도 입니다. 상기시스템식과 아래 지표를 결합해 주세요 Input : Period(14); var : RSIV(0); RSIV = RSI(Period); if RSIV >= 50 Then Plot1(RSIV, "RSI",RED); Else plot1(RSIV,"RSI",blue); PlotBaseLine1(50); 너무 많은 질문을 드린것 같아 죄송합니다 감사합니다