커뮤니티

문의드립니다.

프로필 이미지
비류천
2016-04-06 13:26:53
115
글번호 96894
답변완료
수고 많으십니다. 아래시스템식을 매매횟수를 하루 4번만 하도록 부탁드립니다. 변수로 해주시면 감사하겠습니다. ######################### Input : r(100), s(200), SMTHLEN(50),하루손실틱수(70); VAR : TSIv(0),TSIS(0),T(0); var : NP(0),PreNP(0),DayPL(0),dayloss(0),Xcond(false); NP = NetProfit; if stime ==153000 or (stime > 153000 and stime[1] < 153000) Then{ preNP = NP[1]; Xcond = false; } dayPL = NP-PreNP; dayloss = PriceScale*하루손실틱수; if TotalTrades > TotalTrades[1] and (IsExitName("bl",1) or IsExitName("sl",1)) Then Xcond = true; Value1 = 100 * Ema(Ema(c-c[1], r), s) ; Value2 = Ema(Ema(abs(c-c[1]), r), s) ; TSIv = Value1 / Value2; TSIS = Ema(TSIv, SMTHLEN); if TSIS > TSIS[1] Then T = 1; if TSIS < TSIS[1] Then T = -1; if (stime >= 153000 or stime < 023000) and Xcond == false then{ if T == 1 and T[1] != 1 Then buy(); if T == -1 and T[1] != -1 Then sell(); } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*15,PointStop); if MarketPosition == 1 Then{ ExitLong("bl",AtStop,EntryPrice-(dayloss+dayPL)); } if MarketPosition == -1 Then{ ExitShort("sl",AtStop,EntryPrice+(dayloss+daypl) ); } if stime == 023000 or (stime > 023000 and stime[1] < 023000) Then{ exitlong("bx"); ExitShort("sx"); } ######################################
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-04-06 18:19:27

안녕하세요 예스스탁입니다. ######################### Input : r(100), s(200), SMTHLEN(50),하루손실틱수(70),당일진입횟수(4); VAR : TSIv(0),TSIS(0),T(0); var : NP(0),PreNP(0),DayPL(0),dayloss(0),Xcond(false),TT(0),T1(0),entry(0); NP = NetProfit; TT = TotalTrades; if stime ==153000 or (stime > 153000 and stime[1] < 153000) Then{ preNP = NP[1]; Xcond = false; T1 = TT[1]; } dayPL = NP-PreNP; dayloss = PriceScale*하루손실틱수; if MarketPosition == 0 Then entry = TT-T1; Else entry = TT-T1+1; if TotalTrades > TotalTrades[1] and (IsExitName("bl",1) or IsExitName("sl",1)) Then Xcond = true; Value1 = 100 * Ema(Ema(c-c[1], r), s) ; Value2 = Ema(Ema(abs(c-c[1]), r), s) ; TSIv = Value1 / Value2; TSIS = Ema(TSIv, SMTHLEN); if TSIS > TSIS[1] Then T = 1; if TSIS < TSIS[1] Then T = -1; if (stime >= 153000 or stime < 023000) and Xcond == false and entry < 당일진입횟수 then{ if T == 1 and T[1] != 1 Then buy(); if T == -1 and T[1] != -1 Then sell(); } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*15,PointStop); if MarketPosition == 1 Then{ ExitLong("bl",AtStop,EntryPrice-(dayloss+dayPL)); } if MarketPosition == -1 Then{ ExitShort("sl",AtStop,EntryPrice+(dayloss+daypl) ); } if stime == 023000 or (stime > 023000 and stime[1] < 023000) Then{ exitlong("bx"); ExitShort("sx"); } 즐거운 하루되세요 > 비류천 님이 쓴 글입니다. > 제목 : 문의드립니다. > 수고 많으십니다. 아래시스템식을 매매횟수를 하루 4번만 하도록 부탁드립니다. 변수로 해주시면 감사하겠습니다. ######################### Input : r(100), s(200), SMTHLEN(50),하루손실틱수(70); VAR : TSIv(0),TSIS(0),T(0); var : NP(0),PreNP(0),DayPL(0),dayloss(0),Xcond(false); NP = NetProfit; if stime ==153000 or (stime > 153000 and stime[1] < 153000) Then{ preNP = NP[1]; Xcond = false; } dayPL = NP-PreNP; dayloss = PriceScale*하루손실틱수; if TotalTrades > TotalTrades[1] and (IsExitName("bl",1) or IsExitName("sl",1)) Then Xcond = true; Value1 = 100 * Ema(Ema(c-c[1], r), s) ; Value2 = Ema(Ema(abs(c-c[1]), r), s) ; TSIv = Value1 / Value2; TSIS = Ema(TSIv, SMTHLEN); if TSIS > TSIS[1] Then T = 1; if TSIS < TSIS[1] Then T = -1; if (stime >= 153000 or stime < 023000) and Xcond == false then{ if T == 1 and T[1] != 1 Then buy(); if T == -1 and T[1] != -1 Then sell(); } SetStopLoss(PriceScale*30,PointStop); SetStopProfittarget(PriceScale*15,PointStop); if MarketPosition == 1 Then{ ExitLong("bl",AtStop,EntryPrice-(dayloss+dayPL)); } if MarketPosition == -1 Then{ ExitShort("sl",AtStop,EntryPrice+(dayloss+daypl) ); } if stime == 023000 or (stime > 023000 and stime[1] < 023000) Then{ exitlong("bx"); ExitShort("sx"); } ######################################