커뮤니티

문의드립니다.

프로필 이미지
아침한때비51
2014-09-16 04:16:17
152
글번호 78544
답변완료
1번에서 5번까지 끝나는 시간만 있는거 같습니다. 시작 시간을 넣고 싶어서 문의드립니다. 오후9시 부터 진행시작.. 새벽 04시30분에 끝나는 걸로 부탁드리겠습니다. 아.그리고 1번,2번에 익절 120틱도 넣어 주시구요.익절되면 거래종료로 해주세요. 부탁드리겠습니다. 1. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx",AtStop,daylow-PriceScale); if stime == 043000 Then ExitLong(); } 2. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx",AtStop,dayhigh+PriceScale); if stime == 043000 Then ExitShort(); } 3. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == 1 Then{ if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } } 4. input : DayProfit(40); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if bdate != bdate[1] Then{ EntryStart = true; PreNP = Np[1]; } DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } } 5. input : DayProfit(40); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if bdate != bdate[1] Then{ EntryStart = true; PreNP = Np[1]; } DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C < O and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C > O and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } }
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-09-16 10:07:34

안녕하세요 예스스탁입니다. 수식의 bdate는 결제일입니다. 결제일이 변경되면 진입을 시작하고 새벽 04시30분에 종료되게 작성이 되어 있습니다. 시간 시정으로 변경해 드립니다. 1. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("bx1",1) == true Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx1",Atlimit,EntryPrice+PriceScale*120); ExitLong("bx2",AtStop,daylow-PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitLong(); } 2. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if MarketPosition == 0 and BarsSinceExit(1) == 1 and IsExitName("sx1",1) == true Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx1",atlimit,EntryPrice-PriceScale*120); ExitShort("sx2",AtStop,dayhigh+PriceScale); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then ExitShort(); } 3. input : 시작시간(210000),끝시간(043000); var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then EntryStart = true; if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == 1 Then{ if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{ ExitLong(); } } if MarketPosition == -1 Then{ if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{ ExitShort(); } } 4. input : DayProfit(40),시작시간(210000),끝시간(043000); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ EntryStart = true; PreNP = Np[1]; } if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } } input : DayProfit(40),시작시간(210000),끝시간(043000); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if stime == 시작시간 or (stime > 시작시간 and stime[1] < 시작시간) Then{ EntryStart = true; PreNP = Np[1]; } if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then EntryStart = false; DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C < O and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C > O and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 끝시간 or (stime > 끝시간 and stime[1] < 끝시간) Then{ ExitShort(); } } 즐거운 하루되세요 > 아침한때비51 님이 쓴 글입니다. > 제목 : 문의드립니다. > 1번에서 5번까지 끝나는 시간만 있는거 같습니다. 시작 시간을 넣고 싶어서 문의드립니다. 오후9시 부터 진행시작.. 새벽 04시30분에 끝나는 걸로 부탁드리겠습니다. 아.그리고 1번,2번에 익절 120틱도 넣어 주시구요.익절되면 거래종료로 해주세요. 부탁드리겠습니다. 1. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if MarketPosition == 1 Then{ ExitLong("bx",AtStop,daylow-PriceScale); if stime == 043000 Then ExitLong(); } 2. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == -1 Then{ ExitShort("sx",AtStop,dayhigh+PriceScale); if stime == 043000 Then ExitShort(); } 3. var : EntryStart(false); var1 = ma(c,120); var2 = ma(c,240); if bdate != bdate[1] Then EntryStart = true; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true Then sell(); if MarketPosition == 1 Then{ if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } } 4. input : DayProfit(40); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if bdate != bdate[1] Then{ EntryStart = true; PreNP = Np[1]; } DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C <= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C >= C[2] and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } } 5. input : DayProfit(40); var : EntryStart(false),NP(0),PreNP(0),DayPL(0); var1 = ma(c,120); var2 = ma(c,240); NP = NetProfit; if bdate != bdate[1] Then{ EntryStart = true; PreNP = Np[1]; } DayPL = NP-PreNP; if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then EntryStart = false; if var1 > var2 and C < O and EntryStart == true and DayPL < PriceScale*DayProfit Then buy(); if var1 < var2 and C > O and EntryStart == true and DayPL < PriceScale*DayProfit Then sell(); if MarketPosition == 1 Then{ ExitLong("bx",Atlimit,EntryPrice+((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitLong(); } } if MarketPosition == -1 Then{ ExitShort("sx",Atlimit,EntryPrice-((PriceScale*DayProfit)-dayPL)); if stime == 043000 or (stime > 043000 and stime[1] < 043000) Then{ ExitShort(); } }