커뮤니티

예스랭귀지 Q&A

글쓰기
답변완료

답변해주신거에 대한 재문의

안녕하세요 전일 아래와 같이 답변주셨는데, "Dayclose를 사용하지 않고" 최고최저종가를 저장하는 방법을 다시 부탁드립니다. (close와 for문 Array를 이용하여) input : N(20); var : cnt(0),hc(0),lc(0); if DayClose(N-1) > 0 Then { hc = 0; lc = 0; For cnt = 0 to N-1 { if hc == 0 or (hc > 0 and DayClose(cnt) > hc) Then hc = DayClose(cnt); if lc == 0 or (lc > 0 and DayClose(cnt) < lc) Then lc = DayClose(cnt); } Plot1(hc); plot2(lc); } 즐거운 하루되세요 > oni 님이 쓴 글입니다. > 제목 : 수식 부탁드립니다. > 안녕하세요. 가격박스를 만들고 싶은데요. N일간의 최고종가와 최저종가를 지표로 표현하고 싶은데, 당일 최고와 최저의 종가가 갱신되면 값이 변경되고 갱신되지 않으면 유지 되는 지표를 그리고 싶습니다. dayclose를 사용하는 경우와 그렇지 않고 array와 for문을 이용하여 close만 사용하여 구하는 경우 2가지를 부탁드립니다.
프로필 이미지
oni
2022-11-16
854
글번호 163845
지표
답변완료

수정부탁드립니다

삼각형내부 색상 입히기 수정부탁드립니다. Input:lengthk(12); Var:처리순서(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TtL1(0),TtL2(0),TtL3(0), Text1(0),처리구분(""),T(0); Array:고점[10,2](0),저점[10,2](0); //가격,위치 처리구분 = ""; If Highest(H,lengthk) == H and lastHiVal <> H and Lowest(L,lengthk) == L and lastLoVal <> L Then { If 저점[1,1] > L Then 처리구분 = "저점처리"; If 고점[1,1] < H Then 처리구분 = "고점처리"; } Else If Highest(H,lengthk) == H and lastHiVal <> H Then 처리구분 = "고점처리"; Else If Lowest(L,lengthk) == L and lastLoVal <> L Then 처리구분 = "저점처리"; If 처리구분 == "고점처리" Then { lastHiVal = H; If 고점[1,2] < 저점[1,2] Then { For 처리순서 = 10 DownTo 2 { 고점[처리순서,1] = 고점[처리순서-1,1]; 고점[처리순서,2] = 고점[처리순서-1,2]; } } If 고점[1,2] < 저점[1,2] or 고점[1,1] < H Then { 고점[1,1] = H; 고점[1,2] = Index; sBar = Index - 저점[1,2]; eBar = 0; If TL_GetBeginDate(TtL1) == sDate[sBar] and TL_GetBeginTime(TtL1) == sTime[sBar] Then { TL_Delete(TtL1); TL_Delete(TtL2); TL_Delete(TtL3); Text_Delete(Text1); } TtL1 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); TtL2 = TL_New(sDate[sBar],sTime[sBar],저점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TtL3 = TL_New(sDate[eBar],sTime[eBar],저점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],고점[1,1], NumToStr(고점[1,1],2)); Text_SetStyle(Text1, 2, 1); TL_SetSize(TtL1,2); TL_SetColor(TtL1,red); TL_SetSize(TtL2,2); TL_SetColor(TtL2,red); TL_SetSize(TtL3,2); TL_SetColor(TtL3,BLACK); } } If 처리구분 == "저점처리" Then { lastLoVal = L; If 저점[1,2] < 고점[1,2] then { For 처리순서 = 10 DownTo 2 { 저점[처리순서,1] = 저점[처리순서-1,1]; 저점[처리순서,2] = 저점[처리순서-1,2]; } } If 저점[1,2] < 고점[1,2] or 저점[1,1] > L then { 저점[1,1] = L; 저점[1,2] = Index; sBar = Index - 고점[1,2]; eBar = 0; If TL_GetBeginDate(TtL1) == sDate[sBar] and TL_GetBeginTime(TtL1) == sTime[sBar] Then { TL_Delete(TtL1); TL_Delete(TtL2); TL_Delete(TtL3); Text_Delete(Text1); } TtL1 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); TtL2 = TL_New(sDate[sBar],sTime[sBar],고점[1,1],sDate[eBar],sTime[eBar],고점[1,1]); TtL3 = TL_New(sDate[eBar],sTime[eBar],고점[1,1],sDate[eBar],sTime[eBar],저점[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],저점[1,1],NumToStr(저점[1,1],2)); Text_SetStyle(Text1, 2, 0); TL_SetSize(TtL1,2); TL_SetColor(TtL1,blue); TL_SetSize(TtL2,2); TL_SetColor(TtL2,blue); TL_SetSize(TtL3,2); TL_SetColor(TtL3,BLACK); } }
프로필 이미지
외국인
2022-11-16
938
글번호 163844
지표
답변완료

거래대금 수식 문의 드려요

1분봉 차트에서 과거 10개봉(10분동안) 거래대금 합계를 구하고 싶어요 수식부탁드려요
프로필 이미지
아무다
2022-11-16
959
글번호 163842
지표
답변완료

문의 드립니다

input:length(5),a틱(10),b틱(10),c틱(5); Var:j(0),lastHiVal(0),lastLoVal(0),sBar(0),eBar(0),TL1(0),Text1(0),process(0),T(0); Array:HH[10,2](0),LL[10,2](0); process = 0; If Highest(H,length) == H and lastHiVal <> H and Lowest(L,length) == L and lastLoVal <> L Then { If LL[1,1] > L Then process = -1; If HH[1,1] < H Then process = 1; } Else If Highest(H,length) == H and lastHiVal <> H Then process = 1; Else If Lowest(L,length) == L and lastLoVal <> L Then process = -1; If process == 1 Then { T = 1; lastHiVal = H; If HH[1,2] < LL[1,2] Then { For j = 10 DownTo 2 { HH[j,1] = HH[j-1,1]; HH[j,2] = HH[j-1,2]; } } If HH[1,2] < LL[1,2] or HH[1,1] < H Then { HH[1,1] = H; HH[1,2] = Index; sBar = Index - LL[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } if LL[1,1] > 0 Then { TL1 = TL_New(sDate[sBar],sTime[sBar],LL[1,1],sDate[eBar],sTime[eBar],HH[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0)); Text_SetStyle(Text1, 2, 1); } Else { Text_Delete(text1); Text1 = Text_New(sDate[eBar],sTime[eBar],HH[1,1],"+"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,2)); Text_SetStyle(Text1, 2, 1); } Text_SetStyle(Text1, 2, 1); } if MarketPosition <= 0 and HH[2,1] >= LL[2,1]+PriceScale*a틱 and LL[1,1] <= HH[2,1]-PriceScale*b틱 Then Buy("b",AtStop,HH[2,1]+PriceScale*c틱); } If process == -1 Then { T = -1; lastLoVal = L; If LL[1,2] < HH[1,2] Then { For j = 10 DownTo 2 { LL[j,1] = LL[j-1,1]; LL[j,2] = LL[j-1,2]; } } If LL[1,2] < HH[1,2] or LL[1,1] > L Then { LL[1,1] = L; LL[1,2] = Index; sBar = Index - HH[1,2]; eBar = 0; If TL_GetBeginDate(TL1) == sDate[sBar] and TL_GetBeginTime(TL1) == sTime[sBar] Then { TL_Delete(TL1); Text_Delete(Text1); } if HH[1,1] > 0 Then { TL1 = TL_New(sDate[sBar],sTime[sBar],HH[1,1],sDate[eBar],sTime[eBar],LL[1,1]); Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0)); Text_SetStyle(Text1, 2, 0); } Else { Text_Delete(text1); Text1 = Text_New(sDate[eBar],sTime[eBar],LL[1,1],"-"+NumToStr(abs(HH[1,1]-LL[1,1])/PriceScale,0)); Text_SetStyle(Text1, 2, 0); } } if MarketPosition >= 0 and LL[2,1] <= HH[2,1]-PriceScale*a틱 and HH[1,1] >= LL[2,1]+PriceScale*b틱 Then Sell("s",AtStop,LL[2,1]-PriceScale*c틱); } 추세선은 매매시간 넣으니 오류가 자꾸 나네요 해외선물 매매시간 좀 넣어주세요 ~ 15:00~ 익일 06:00 , 익일 06 :00는 오버없는 자동청산입니다 ---------------- input : 익절틱수(0),손절틱수(0); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b",AtStop,NextBarOpen+PriceScale*10); Sell("s",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("ss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("ss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen > C Then { Buy("b2",AtStop,NextBarOpen+PriceScale*10); Sell("s2",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen < C Then { ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10); ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("sss",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("sss1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b8",AtStop,NextBarOpen+PriceScale*10); Sell("s8",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); if NextBarSdate != sDate Then { if NextBarOpen < C Then { Buy("b9",AtStop,NextBarOpen+PriceScale*10); Sell("s9",AtStop,NextBarOpen-PriceScale*10); } if NextBarOpen > C Then { ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10); ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10); } } if MarketPosition > 1 Then Sell("bbb",AtStop,EntryPrice-10); if MarketPosition < -1 Then Buy("bbb1",AtStop,EntryPrice+10); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); SetStopProfittarget(PriceScale*익절틱수,PointStop); SetStopLoss(PriceScale*손절틱수,PointStop); ------------------ 해외선물 매매시간 08 :00 ~ 익일 06 :00 자동청산 2회까지 진입신호후 아침 06시 자동청산의 수식어 추가를 부탁드립니다.
프로필 이미지
푸른
2022-11-16
1300
글번호 163841
시스템
답변완료

분챠트 수식문의

분챠트 또는 틱챠트에서 5일이동평균선 수식부탁드립니다
프로필 이미지
한림
2022-11-16
1291
글번호 163839
지표
답변완료

수식

안녕하세요. 고생이 많으십니다. 틱봉에 1분봉의 5개(즉, 9시부터 9시5분까지) 고가, 저가를 적용할수 있도록 부탁드립니다. 감사합니다.
프로필 이미지
한국사람73
2022-11-16
1663
글번호 163835
지표

심홍 님에 의해서 삭제되었습니다.

프로필 이미지
심홍
2022-11-16
0
글번호 163832
종목검색
답변완료

수식 문의드립니다

안녕하세요 종목검색 문의드립니다 일봉상 종가기준 10% 급등한 종목이 종가상으로 10일선을 데드크로스한 시점에서 종목검색을 할 수 있도록 종목검색식과 지표식을 부탁드립니다
프로필 이미지
심홍
2022-11-16
1157
글번호 163831
종목검색
답변완료

문의드립니다.

안녕하세요. 시스템 트레이딩 초보입니다. 유튜브도 보고 했는데 막상 프로그램을 작성 하려니 너무 막막하네요. 일단 만들고 싶은 기준은 있는데 시작을 못하고 있어서 도움 부탁드립니다. 내용은, 1. 5분봉 차트에서 MACD가 기준선 상향 돌파일 때 매수하고, RSI 과열 구간이 나오면 매도. 2. 5분봉 차트에서 MACD가 기준선 하향 톨파일 때 매도 하고, RSI 침체 구간이 나오면 매수 이거랑. 3. 5분봉 차트에서 MACD가 기준선 상향 돌파 후, 10분 봉 차트에서 MACD가 기준선 하향 돌파하면 매도. 이렇게 하려면 어떻게 작성 해야 하나요?
프로필 이미지
래피
2022-11-16
1312
글번호 163830
시스템
답변완료

안녕하세요^^

NH트레이더 예스랭귀지 장중 실시간 주식종목 검색을 하고자 합니다 1.macd(5,20,종가)>= 0 2.macd(5,20,종가)>= macd(5,20,9 ,종가) # MACD가 시그널9 보다 클때 3.DEMAmacd(5,20,종가)>= 0 4.DEMAmacd(5,20,종가)>= DEMAmacd(5,20,9 ,종가) # DEMAMACD가 시그널9 보다 클때 감사합니다 보람된 하루되세요~~
프로필 이미지
울버린777
2022-11-15
1165
글번호 163829
종목검색