커뮤니티

부탁드립나다

프로필 이미지
파생돌이
2020-02-12 17:03:56
422
글번호 135888
답변완료
수고하십니다 아래수식을 (적색,청색,노랑.검정화살표시로 부탁드립니다) Input : shortPeriod(12), longPeriod(26), Period(9); Var : value(0), macdosc(0),Direction(0),Direction1(0) ; value = MACD(shortPeriod, longPeriod); macdosc =ema(value,Period); if value > value[1] Then Direction = 1; if value < value[1] Then Direction = -1; if Direction == 1 and Direction[1] != 1 Then plot1(L-PriceScale*4,"MACD",RED); if Direction == -1 and Direction[1] != -1 Then plot1(H+PriceScale*4,"MACD",BLUE); if macdosc > macdosc [1] Then Direction1 = 1; if macdosc < macdosc [1] Then Direction1 = -1; if Direction1 == 1 and Direction1[1] != 1 Then plot2(L-PriceScale*4,"시그널",YELLOW); if Direction1 == -1 and Direction1[1] != -1 Then plot2(H+PriceScale*5,"시그널",BLACK);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2020-02-13 12:46:14

안녕하세요 예스스탁입니다. 지표나 검색에 화살표가 없습니다. 텍스트 함수로 삼가형으로 표시되게 작성해 드립니다. Input : shortPeriod(12), longPeriod(26), Period(9); Var : value(0), macdosc(0),Direction(0),Direction1(0) ; var : Tx1(0),Tx2(0),tx3(0),tx4(0); value = MACD(shortPeriod, longPeriod); macdosc =ema(value,Period); if value > value[1] Then Direction = 1; if value < value[1] Then Direction = -1; if Direction == 1 and Direction[1] != 1 Then { tx1 = Text_New(sdate,stime,L-PriceScale*4,"▲"); Text_SetStyle(tx1,2,2); Text_SetColor(tx1,RED); } if Direction == -1 and Direction[1] != -1 Then { tx2 = Text_New(sdate,stime,h+PriceScale*4,"▼"); Text_SetStyle(tx2,2,2); Text_SetColor(tx2,BLUE); } if macdosc > macdosc [1] Then Direction1 = 1; if macdosc < macdosc [1] Then Direction1 = -1; if Direction1 == 1 and Direction1[1] != 1 Then { tx3 = Text_New(sdate,stime,L-PriceScale*4,"▲"); Text_SetStyle(tx3,2,2); Text_SetColor(tx3,YELLOW); } if Direction1 == -1 and Direction1[1] != -1 Then { tx4 = Text_New(sdate,stime,h+PriceScale*5,"▼"); Text_SetStyle(tx4,2,2); Text_SetColor(tx4,BLACK); } 즐거운 하루되세요 > 파생돌이 님이 쓴 글입니다. > 제목 : 부탁드립나다 > 수고하십니다 아래수식을 (적색,청색,노랑.검정화살표시로 부탁드립니다) Input : shortPeriod(12), longPeriod(26), Period(9); Var : value(0), macdosc(0),Direction(0),Direction1(0) ; value = MACD(shortPeriod, longPeriod); macdosc =ema(value,Period); if value > value[1] Then Direction = 1; if value < value[1] Then Direction = -1; if Direction == 1 and Direction[1] != 1 Then plot1(L-PriceScale*4,"MACD",RED); if Direction == -1 and Direction[1] != -1 Then plot1(H+PriceScale*4,"MACD",BLUE); if macdosc > macdosc [1] Then Direction1 = 1; if macdosc < macdosc [1] Then Direction1 = -1; if Direction1 == 1 and Direction1[1] != 1 Then plot2(L-PriceScale*4,"시그널",YELLOW); if Direction1 == -1 and Direction1[1] != -1 Then plot2(H+PriceScale*5,"시그널",BLACK);