커뮤니티

지표와 시스템

프로필 이미지
어떤하루
2025-12-11 15:39:07
71
글번호 228896
답변완료

1. 아래 수식에서 0선 통과시  소리가 나는 알람을 추가하고 싶습니다.

2.아래 수식을 시스템 식으로 만들어 주세요. 0선 통과시 2계약 진입후 1계약은 20틱에 매도하고 나머지는 40틱에 매도 되는걸로. 반대로 손절은 진입후 1계약은 20틱 나머지 40틱 손절처리 부탁드립니다.


input : short(30),long(200); var : macdv(0),tx(0); macdv = macd(short,long); Plot1(macdv); PlotBaseLine1(0); var : tx1(0),tx2(0); var : tl1(0),tl2(0),box1(0); var : tl3(0),tl4(0),box2(0); if CrossUp(macdv,0) Then {       tx1 = TL_New(sDate,sTime,0,sDate,sTime,99999999);      tl_SetColor(tx1,Red);       tl_SetSize(tx1,0);       tL_SetStyle(tx1,2);        tx1 = Text_New(sDate,sTime,L,"▲");       Text_SetColor(tx1,Red);       Text_SetSize(tx1,40);         Text_SetStyle(tx1,2,0);      tx2 = Text_New_Self(sDate,sTime,0,"▲");       Text_SetColor(tx2,rgb(255, 0, 127));       Text_SetSize(tx2,20);         Text_SetStyle(tx2,2,0); ;          } Else {       TL_SetEnd(tl1,NextBarSdate,NextBarStime,var1);       TL_SetEnd(tl2,NextBarSdate,NextBarStime,var2);       box_SetEnd(box1,NextBarSdate,NextBarStime,var2); } if CrossDown(macdv,0) Then {       tx1 = TL_New(sDate,sTime,0,sDate,sTime,999999999);       tl_SetColor(tx1,Black);       tl_SetSize(tx1,0);       tL_SetStyle(tx1,2);   tx1 = Text_New(sDate,sTime,H,"▼");       Text_SetColor(tx1, Black);       Text_SetSize(tx1,40);         Text_SetStyle(tx1,2,1);       tx2 = Text_New_Self(sDate,sTime,0,"▼");       Text_SetColor(tx2,Black);       Text_SetSize(tx2,20);       Text_SetStyle(tx2,2,1);        } Else {       TL_SetEnd(tl3,NextBarSdate,NextBarStime,var3);       TL_SetEnd(tl4,NextBarSdate,NextBarStime,var4);       box_SetEnd(box2,NextBarSdate,NextBarStime,var4);       }


지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-12-12 13:32:39

안녕하세요 예스스탁입니다. 1 소리출력함수(playsound)는 함수내에 지정한 경로의 wav파일이 구동됩니다. 아래는 예스트레이더에 기본으로 제공되는 wav파일을 지정했습니다. 원하시는 wav파일의 경로와 이름으로 수정하시기 바랍니다. 게시판에서 식을 복사할 경우 경로명 중 ₩의 폰트가 깨질수 있으므로 ₩는 다시 타이핑하시기 바랍니다. PlaySound("C:₩예스트레이더₩data₩Sound₩alert.wav"); input : short(30),long(200); var : macdv(0),tx(0); macdv = macd(short,long); Plot1(macdv); PlotBaseLine1(0); var : tx1(0),tx2(0); var : tl1(0),tl2(0),box1(0); var : tl3(0),tl4(0),box2(0); if CrossUp(macdv,0) Then { tx1 = TL_New(sDate,sTime,0,sDate,sTime,99999999); tl_SetColor(tx1,Red); tl_SetSize(tx1,0); tL_SetStyle(tx1,2); tx1 = Text_New(sDate,sTime,L,"▲"); Text_SetColor(tx1,Red); Text_SetSize(tx1,40); Text_SetStyle(tx1,2,0); tx2 = Text_New_Self(sDate,sTime,0,"▲"); Text_SetColor(tx2,rgb(255, 0, 127)); Text_SetSize(tx2,20); Text_SetStyle(tx2,2,0); PlaySound(""); } Else { TL_SetEnd(tl1,NextBarSdate,NextBarStime,var1); TL_SetEnd(tl2,NextBarSdate,NextBarStime,var2); box_SetEnd(box1,NextBarSdate,NextBarStime,var2); } if CrossDown(macdv,0) Then { tx1 = TL_New(sDate,sTime,0,sDate,sTime,999999999); tl_SetColor(tx1,Black); tl_SetSize(tx1,0); tL_SetStyle(tx1,2); tx1 = Text_New(sDate,sTime,H,"▼"); Text_SetColor(tx1, Black); Text_SetSize(tx1,40); Text_SetStyle(tx1,2,1); tx2 = Text_New_Self(sDate,sTime,0,"▼"); Text_SetColor(tx2,Black); Text_SetSize(tx2,20); Text_SetStyle(tx2,2,1); PlaySound(""); } Else { TL_SetEnd(tl3,NextBarSdate,NextBarStime,var3); TL_SetEnd(tl4,NextBarSdate,NextBarStime,var4); box_SetEnd(box2,NextBarSdate,NextBarStime,var4); } 2 input : short(30),long(200); var : macdv(0),tx(0); macdv = macd(short,long); if CrossUp(macdv,0) Then { Buy("b",OnClose,Def,2); } if CrossDown(macdv,0) Then { Sell("s",OnClose,Def,2); } if MarketPosition == 1 Then { ExitLong("Bp1",AtLimit,EntryPrice+PriceScale*20,"",1,1); ExitLong("Bp2",AtLimit,EntryPrice+PriceScale*40,"",1,1); ExitLong("Bl1",AtStop,EntryPrice-PriceScale*20,"",1,1); ExitLong("Bl2",AtStop,EntryPrice-PriceScale*40,"",1,1); } if MarketPosition == -1 Then { ExitShort("Sp1",AtLimit,EntryPrice-PriceScale*20,"",1,1); ExitShort("sp2",AtLimit,EntryPrice-PriceScale*40,"",1,1); ExitShort("Sl1",AtStop,EntryPrice+PriceScale*20,"",1,1); ExitShort("Sl2",AtStop,EntryPrice+PriceScale*40,"",1,1); } 즐거운 하루되세요