커뮤니티

가격 수식변경

프로필 이미지
상암동
2017-12-10 22:53:15
164
글번호 114870
답변완료
늘 감사합니다. 1. 아래의 수식을 수정해 주세요. 2. 현재의 시작 가격은 당일의 싯가 가격을 기준으로 하고 있습니다 이것을 변경 가능한 시간의 싯가 가격으로 변경 적용 하고 싶습니다. 예를들면 data1과 data2의 싯가 가격을 10시30분 또는 11시35분 등의 싯가의 가격으로 적용해 주세요 3. 시스템식도 위의 변경된 조건으로 수식변경후 아래 내용 추가 첫진입후 익절후 진입금지. 첫손절후 한번만 더 진입, 당일 장종료 1시간30분전 강제청산 4. 감사합니다. 1. var : diff(0,data1),TL(0,data1); var : V1(0,data1),V2(0,data1),V3(0,data1),V4(0,data1),V5(0,data1); var : O2(0,data2); if data1(Bdate != Bdate[1]) Then{ v1 = data1(sdate[1]); v2 = data1(stime[1]); v3 = data1(h); v4 = data1(L); v5 = data1(C); } if data2(Bdate != Bdate[1]) Then O2 = data2(O); diff = data1((C-dayopen)/PriceScale)-data2((C-O2)/PriceScale); TL_Delete(TL); if diff >= 80 then{ TL = TL_New(v1,v2,v3,sdate,stime,v3); TL_SetColor(TL,RED); } Else if diff <= -80 then{ TL = TL_New(v1,v2,v4,sdate,stime,v4); TL_SetColor(TL,blue); } else{ TL = TL_New(v1,v2,v5,sdate,stime,v5); TL_SetColor(TL,BLACK); } 2 var : diff(0,data1),T1(0,data1),entry(0,data1); var : O2(0,data2); if data1(Bdate != Bdate[1]) Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if data2(Bdate != Bdate[1]) Then O2 = data2(O); diff = data1((C-dayopen)/PriceScale)-data2((C-O2)/PriceScale); if diff >= 80 and diff[1] < 80 then{ if entry == 0 or (entry >= 1 and MarketPosition == -1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then buy(); } if diff <= -80 and diff[1] > -80 then{ if entry == 0 or (entry >= 1 and MarketPosition == 1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then sell(); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*20,PointStop);
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2017-12-12 09:26:13

안녕하세요 예스스탁입니다. 1. input : ntime(103000); var : diff(0,data1),TL(0,data1); var : V1(0,data1),V2(0,data1),V3(0,data1),V4(0,data1),V5(0,data1); var : O1(0,data1),O2(0,data2); if data1(stime == ntime or (stime > ntime and stime[1] < ntime)) Then{ v1 = data1(sdate[1]); v2 = data1(stime[1]); O1 = data1(O); v3 = data1(h); v4 = data1(L); v5 = data1(C); } if data2(stime == ntime or (stime > ntime and stime[1] < ntime)) Then O2 = data2(O); diff = data1((C-O1)/PriceScale)-data2((C-O2)/PriceScale); TL_Delete(TL); if diff >= 80 then{ TL = TL_New(v1,v2,v3,sdate,stime,v3); TL_SetColor(TL,RED); } Else if diff <= -80 then{ TL = TL_New(v1,v2,v4,sdate,stime,v4); TL_SetColor(TL,blue); } else{ TL = TL_New(v1,v2,v5,sdate,stime,v5); TL_SetColor(TL,BLACK); } 2 input : ntime(103000); var : diff(0,data1),T1(0,data1),entry(0,data1); var : O1(0,data1),O2(0,data2); if data1(stime == ntime or (stime > ntime and stime[1] < ntime)) Then{ O1 = O; T1 = TotalTrades; } if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if data2(stime == ntime or (stime > ntime and stime[1] < ntime)) Then O2 = data2(O); diff = data1((C-O1)/PriceScale)-data2((C-O2)/PriceScale); if diff >= 80 and diff[1] < 80 and stime >= ntime then{ if entry == 0 or (entry >= 1 and MarketPosition == -1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then buy(); } if diff <= -80 and diff[1] > -80 then{ if entry == 0 or (entry >= 1 and MarketPosition == 1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then sell(); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*20,PointStop); 즐거운 하루되세요 > 상암동 님이 쓴 글입니다. > 제목 : 가격 수식변경 > 늘 감사합니다. 1. 아래의 수식을 수정해 주세요. 2. 현재의 시작 가격은 당일의 싯가 가격을 기준으로 하고 있습니다 이것을 변경 가능한 시간의 싯가 가격으로 변경 적용 하고 싶습니다. 예를들면 data1과 data2의 싯가 가격을 10시30분 또는 11시35분 등의 싯가의 가격으로 적용해 주세요 3. 시스템식도 위의 변경된 조건으로 수식변경후 아래 내용 추가 첫진입후 익절후 진입금지. 첫손절후 한번만 더 진입, 당일 장종료 1시간30분전 강제청산 4. 감사합니다. 1. var : diff(0,data1),TL(0,data1); var : V1(0,data1),V2(0,data1),V3(0,data1),V4(0,data1),V5(0,data1); var : O2(0,data2); if data1(Bdate != Bdate[1]) Then{ v1 = data1(sdate[1]); v2 = data1(stime[1]); v3 = data1(h); v4 = data1(L); v5 = data1(C); } if data2(Bdate != Bdate[1]) Then O2 = data2(O); diff = data1((C-dayopen)/PriceScale)-data2((C-O2)/PriceScale); TL_Delete(TL); if diff >= 80 then{ TL = TL_New(v1,v2,v3,sdate,stime,v3); TL_SetColor(TL,RED); } Else if diff <= -80 then{ TL = TL_New(v1,v2,v4,sdate,stime,v4); TL_SetColor(TL,blue); } else{ TL = TL_New(v1,v2,v5,sdate,stime,v5); TL_SetColor(TL,BLACK); } 2 var : diff(0,data1),T1(0,data1),entry(0,data1); var : O2(0,data2); if data1(Bdate != Bdate[1]) Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = TotalTrades-T1+1; if data2(Bdate != Bdate[1]) Then O2 = data2(O); diff = data1((C-dayopen)/PriceScale)-data2((C-O2)/PriceScale); if diff >= 80 and diff[1] < 80 then{ if entry == 0 or (entry >= 1 and MarketPosition == -1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then buy(); } if diff <= -80 and diff[1] > -80 then{ if entry == 0 or (entry >= 1 and MarketPosition == 1 and TimeToMinutes(stime) >= TimeToMinutes(EntryTime)+30) or (entry >= 1 and MarketPosition == 0 and TimeToMinutes(stime) >= TimeToMinutes(ExitTime(1))+30) then sell(); } SetStopProfittarget(PriceScale*30,PointStop); SetStopLoss(PriceScale*20,PointStop);