커뮤니티

항상 감사합니다..오전에 전화드렸었는데요..

프로필 이미지
회원
2015-05-11 10:27:24
142
글번호 85891
답변완료
안녕하세요.. 오전에 전화드렸었는데요.. 실수로 수식을 수정되지않은 수식에 적용해서 다시 질문 드립니다.. 아래 수식에다가 오전에 질문드렸던 내용( 하루 수익이 20틱이상이면 매매중단하라는 수식) 을 입력해주시면 감사하겠읍니다.. Input : Period(50), Percent(0.1); var : center(0),UPline(0),DNline(0),T(0),Bcond(false),Scond(false); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); if crossup(c,upline) Then{ T = 1; var1 = C; Scond = false; } if CrossDown(c,dnline) Then{ T = -1; var1 = C; Bcond = false; } if C > dnLine and C < upline Then{ T = 0; Bcond = false; Scond = false; } if MarketPosition == -1 and MarketPosition != MarketPosition[1] Then Scond = true; if MarketPosition == 1 and MarketPosition != MarketPosition[1] Then Bcond = true; if T == 1 and Scond == false Then{ Sell("매도",AtLimit,var1+PriceScale*10); } if T == -1 and Bcond == false Then{ buy("매수",AtLimit,var1-PriceScale*10); } SetStopProfittarget(PriceScale*10,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-05-12 12:12:43

안녕하세요 예스스탁입니다. Input : Period(50), Percent(0.1); var : center(0),UPline(0),DNline(0),T(0),Bcond(false),Scond(false); var : NP(0),PreNP(0),dayPL(0); NP = NetProfit; if date != date[1] Then preNP = NP; dayPL = NP-preNP; center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); if crossup(c,upline) Then{ T = 1; var1 = C; Scond = false; } if CrossDown(c,dnline) Then{ T = -1; var1 = C; Bcond = false; } if C > dnLine and C < upline Then{ T = 0; Bcond = false; Scond = false; } if MarketPosition == -1 and MarketPosition != MarketPosition[1] Then Scond = true; if MarketPosition == 1 and MarketPosition != MarketPosition[1] Then Bcond = true; if T == 1 and Scond == false and dayPL <= PriceScale*20 Then{ Sell("매도",AtLimit,var1+PriceScale*10); } if T == -1 and Bcond == false and dayPL <= PriceScale*20 Then{ buy("매수",AtLimit,var1-PriceScale*10); } SetStopProfittarget(PriceScale*10,PointStop); 즐거운 하루되세요 > EG_ansaltjd9979 님이 쓴 글입니다. > 제목 : 항상 감사합니다..오전에 전화드렸었는데요.. > 안녕하세요.. 오전에 전화드렸었는데요.. 실수로 수식을 수정되지않은 수식에 적용해서 다시 질문 드립니다.. 아래 수식에다가 오전에 질문드렸던 내용( 하루 수익이 20틱이상이면 매매중단하라는 수식) 을 입력해주시면 감사하겠읍니다.. Input : Period(50), Percent(0.1); var : center(0),UPline(0),DNline(0),T(0),Bcond(false),Scond(false); center = ma(C, Period); UPline = EnvelopeUp(Period, Percent); Dnline = EnvelopeDown(Period, Percent); if crossup(c,upline) Then{ T = 1; var1 = C; Scond = false; } if CrossDown(c,dnline) Then{ T = -1; var1 = C; Bcond = false; } if C > dnLine and C < upline Then{ T = 0; Bcond = false; Scond = false; } if MarketPosition == -1 and MarketPosition != MarketPosition[1] Then Scond = true; if MarketPosition == 1 and MarketPosition != MarketPosition[1] Then Bcond = true; if T == 1 and Scond == false Then{ Sell("매도",AtLimit,var1+PriceScale*10); } if T == -1 and Bcond == false Then{ buy("매수",AtLimit,var1-PriceScale*10); } SetStopProfittarget(PriceScale*10,PointStop);