커뮤니티

수식부탁드립니다

프로필 이미지
외부의도
2021-05-12 18:29:01
1265
글번호 148958
답변완료
안녕하세요.. 아래수식에서 1) Reverse1및 Reverse2 가 상승하면 각각 Pink 표시하고 Reverse1 > Reverse2 상태에서 -- Reverse1및 Reverse2 상승하면 Cyan,하락하면 Lcyan 2) Reverse1및 Reverse2 가 하락하면 각각 Lcyan 표시하고 Reverse1 < Reverse2 상태에서 -- Reverse1및 Reverse2가 하락하면 Red,하락하면 Lcyan 3) Reverse1 > RSI 이면 RSI 색을 BLUE , Reverse1 < RSI 이면 RSI 색을 Red 표시 .. 답변해주신 수식으로는 색은 제대로 표시되나 챠트가 다르게 구현되어 다시부탁드립니다 Input : Short(12), Long(24); Input : Period1(9); var : RSI1(0); value1 = accumN(C-C[1],Short); value2 = accumN(C-C[1],Long); value3 = iff(C>C[1],C-C[1],0); value4 = iff(C<C[1],C-C[1],0); RSI1 = RSI(Period1); PlotBaseLine1(0, "기준"); PlotBaseLine2(75, "기준2"); PlotBaseLine3(-75, "기준3"); if RSI1 >=RSI1[1] Then plot3(RSI1-50,"RSI1",YELLOW); if RSI1 <=RSI1[1] Then plot3(RSI1-50,"RSI1",BLUE); If value1 > 0 Then plot2 (value1*(-100)/accumN(value3,Short), "reverse1"); Else plot2 (value1*100/accumN(value4,Short), "reverse1"); If value2 > 0 then plot1(value2*(-100)/accumN(value3,Long),"reverse2"); Else plot1(value2*100/accumN(value4,Long),"reverse2");
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-05-13 10:29:38

안녕하세요 예스스탁입니다. Reverse1 < Reverse2 상태에서 -- Reverse1및 Reverse2가 하락하면 Red,하락하면 Lcyan 역배열에서 조건이 둘다하락이라 상승하면 RED으로 하락하면 Lcyan으로 표식되게 작성해 드립니다. Input : Short(12), Long(24); Input : Period1(9); var : RSI1(0),R1(0),R2(0),C1(0),C2(0); value1 = accumN(C-C[1],Short); value2 = accumN(C-C[1],Long); value3 = iff(C>C[1],C-C[1],0); value4 = iff(C<C[1],C-C[1],0); RSI1 = RSI(Period1); If value1 > 0 Then R1 = value1*(-100)/accumN(value3,Short); Else R1 = value1*100/accumN(value4,Short); If value2 > 0 then R2 = value2*(-100)/accumN(value3,Long); Else R2 = value2*100/accumN(value4,Long); PlotBaseLine1(0, "기준"); PlotBaseLine2(75, "기준2"); PlotBaseLine3(-75, "기준3"); plot3(RSI1-50,"RSI1",IFf(R1 > RSI1-50,BLUE,RED)); if R1 > R2 Then { if R1 > R1[1] Then C1 = CYAN; Else C1 = LCYAN; if R2 > R2[1] Then C2 = CYAN; Else C2 = LCYAN; } Else { if R1 > R1[1] Then C1 = RED; Else C1 = LCYAN; if R2 > R2[1] Then C2 = RED; Else C2 = LCYAN; } Plot1(R1,"reverse1",C1); Plot2(R2,"reverse2",C2); 즐거운 하루되세요 > 외부의도 님이 쓴 글입니다. > 제목 : 수식부탁드립니다 > 안녕하세요.. 아래수식에서 1) Reverse1및 Reverse2 가 상승하면 각각 Pink 표시하고 Reverse1 > Reverse2 상태에서 -- Reverse1및 Reverse2 상승하면 Cyan,하락하면 Lcyan 2) Reverse1및 Reverse2 가 하락하면 각각 Lcyan 표시하고 Reverse1 < Reverse2 상태에서 -- Reverse1및 Reverse2가 하락하면 Red,하락하면 Lcyan 3) Reverse1 > RSI 이면 RSI 색을 BLUE , Reverse1 < RSI 이면 RSI 색을 Red 표시 .. 답변해주신 수식으로는 색은 제대로 표시되나 챠트가 다르게 구현되어 다시부탁드립니다 Input : Short(12), Long(24); Input : Period1(9); var : RSI1(0); value1 = accumN(C-C[1],Short); value2 = accumN(C-C[1],Long); value3 = iff(C>C[1],C-C[1],0); value4 = iff(C<C[1],C-C[1],0); RSI1 = RSI(Period1); PlotBaseLine1(0, "기준"); PlotBaseLine2(75, "기준2"); PlotBaseLine3(-75, "기준3"); if RSI1 >=RSI1[1] Then plot3(RSI1-50,"RSI1",YELLOW); if RSI1 <=RSI1[1] Then plot3(RSI1-50,"RSI1",BLUE); If value1 > 0 Then plot2 (value1*(-100)/accumN(value3,Short), "reverse1"); Else plot2 (value1*100/accumN(value4,Short), "reverse1"); If value2 > 0 then plot1(value2*(-100)/accumN(value3,Long),"reverse2"); Else plot1(value2*100/accumN(value4,Long),"reverse2");