커뮤니티

문의

프로필 이미지
회원
2015-05-26 15:11:06
164
글번호 86416
답변완료
안녕하세요 1. 아래식은 이평선을 이용해서 만든 수식인데요. 국내선물용으로 point로 만든건데, 혹시 틱수로 조정해서 해선에 응용을 하고 싶은데 수정 좀 부탁드립니다. 2. 추가로 해외선물에서 당일 봉의 고가-저가의 틱수를 차트내에 텍스트로 표현하는 식을 부탁합니다. 감사합니다. --------------------------------------------------------------------------------------------------- input : N(0.05),loss(0.3),ret(0.4),Profit(0.4),switch(1); var1 = ma(c,10); var2 = ma(c,40); if dayindex+1 >= 10 and stime < 145000 Then { if MarketPosition <= 0 and var2 > var2[1] and var1>var2 and C <= var1-N and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { buy("b"); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); ExitLong("bx2",AtLimit,C+Profit); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); } if MarketPosition >= 0 and var2 < var2[1] and var1<var2 and C >= var1+N and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { sell("s"); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); ExitShort("sx2",AtLimit,C-Profit); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); } } if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+ret Then exitlong("Bx",AtStop,EntryPrice); ExitLong("bP",AtLimit,EntryPrice+Profit); if switch == 0 then ExitLong("bL",AtStop, EntryPrice-loss); } if MarketPosition == -1 then{ if lowest(L,BarsSinceEntry) <= EntryPrice-ret Then ExitShort("sx",AtStop,EntryPrice); ExitShort("sP",AtLimit,EntryPrice-Profit); if switch == 0 then ExitShort("sL",AtStop, EntryPrice+loss); } SetStopEndofday(145900);
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2015-05-27 15:22:24

안녕하세요 예스스탁입니다. 1. 모두 틱수로 지정되게 변경했습니다. input : N(1),loss(6),ret(8),Profit(8),switch(1); var1 = ma(c,10); var2 = ma(c,40); if dayindex+1 >= 10 and stime < 145000 Then { if MarketPosition <= 0 and var2 > var2[1] and var1>var2 and C <= var1-N*PriceScale and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { buy("b"); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); ExitLong("bx2",AtLimit,C+Profit); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); } if MarketPosition >= 0 and var2 < var2[1] and var1<var2 and C >= var1+N*PriceScale and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { sell("s"); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); ExitShort("sx2",AtLimit,C-Profit); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); } } if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+ret*PriceScale Then exitlong("Bx",AtStop,EntryPrice); ExitLong("bP",AtLimit,EntryPrice+Profit*PriceScale); if switch == 0 then ExitLong("bL",AtStop, EntryPrice-loss*PriceScale); } if MarketPosition == -1 then{ if lowest(L,BarsSinceEntry) <= EntryPrice-ret*PriceScale Then ExitShort("sx",AtStop,EntryPrice); ExitShort("sP",AtLimit,EntryPrice-Profit*PriceScale); if switch == 0 then ExitShort("sL",AtStop, EntryPrice+loss*PriceScale); } SetStopEndofday(145900); 2. VAR1 = (DAYHIGH-DAYLOW)/PriceScale; Text_Delete(VAR2); VAR2 = Text_New(SDATE,STIME,h,NumToStr(VAR1,0)); PLOT1(VAR1); 즐거운 하루되세요 > NH_jh***** 님이 쓴 글입니다. > 제목 : 문의 > 안녕하세요 1. 아래식은 이평선을 이용해서 만든 수식인데요. 국내선물용으로 point로 만든건데, 혹시 틱수로 조정해서 해선에 응용을 하고 싶은데 수정 좀 부탁드립니다. 2. 추가로 해외선물에서 당일 봉의 고가-저가의 틱수를 차트내에 텍스트로 표현하는 식을 부탁합니다. 감사합니다. --------------------------------------------------------------------------------------------------- input : N(0.05),loss(0.3),ret(0.4),Profit(0.4),switch(1); var1 = ma(c,10); var2 = ma(c,40); if dayindex+1 >= 10 and stime < 145000 Then { if MarketPosition <= 0 and var2 > var2[1] and var1>var2 and C <= var1-N and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { buy("b"); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); ExitLong("bx2",AtLimit,C+Profit); # Text_New(sdate,stime,H+PriceScale*2,NumToStr(var1-N,2)); } if MarketPosition >= 0 and var2 < var2[1] and var1<var2 and C >= var1+N and (TotalTrades == 0 or (TotalTrades >= 1 and BarsSinceExit(1) != 0)) Then { sell("s"); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); ExitShort("sx2",AtLimit,C-Profit); # Text_New(sdate,stime,L-PriceScale*2,NumToStr(var1+N,2)); } } if MarketPosition == 1 Then{ if highest(H,BarsSinceEntry) >= EntryPrice+ret Then exitlong("Bx",AtStop,EntryPrice); ExitLong("bP",AtLimit,EntryPrice+Profit); if switch == 0 then ExitLong("bL",AtStop, EntryPrice-loss); } if MarketPosition == -1 then{ if lowest(L,BarsSinceEntry) <= EntryPrice-ret Then ExitShort("sx",AtStop,EntryPrice); ExitShort("sP",AtLimit,EntryPrice-Profit); if switch == 0 then ExitShort("sL",AtStop, EntryPrice+loss); } SetStopEndofday(145900);